This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
9
Help with Randomized quicksort?
Post Flair (click to view more posts with a particular flair)
Post Body
I am trying to set up a randomized quick sort so that it will sort an array of fractions first on value, and if the value is the same it will be sorted ascendingly e.g. 1/1 befor 2/2
This is my code so far:
http://pastebin.com/9Tf82JA6
Yet something is wrong with it and I can't figure it out.
EDIT: I solved it by creating my own smaller then clause, meaning that 1/2 is smaller than 2/4 usign that clause, and not equal to, it solved the issue.
Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
207,040
Link Karma
5,771
Comment Karma
200,986
Profile updated: 4 days ago
Posts updated: 10 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 12 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnprogra...