d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Sorting Advice > 9000 Random Generated Integers Sorted
Prev123Next
Add Reply New Topic New Poll
Member
Posts: 3,321
Joined: May 20 2011
Gold: Locked
Jun 1 2013 08:51pm
Quote (carteblanche @ Jun 1 2013 10:38pm)
Go back under your bridge.


lol, don't be mad just because your method was comparable to selection sort and a poor form of recursion. Go read a book.

This post was edited by slapnutz2284 on Jun 1 2013 09:06pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 1 2013 09:05pm
Quote (slapnutz2284 @ Jun 1 2013 10:51pm)
lol, don't be mad just because your method was comparable to bubble sort and a poor form of recursion.  Go read a book.


Member
Posts: 3,321
Joined: May 20 2011
Gold: Locked
Jun 1 2013 09:09pm
That's cute, you spent 20 minutes to find a picture because you had nothing intelligent to say. Come back when you know what you are doing. Good luck with your sorting hell78 and try not to get so butt hurt when someone gives better advice than you carte.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 1 2013 09:30pm
i was giving you the benefit of the doubt by assuming you were trolling. but i guess i was wrong. should i point out everything wrong that you said?

Quote (slapnutz2284 @ Jun 1 2013 10:07pm)
Wouldn't Merge sort be the best because its worst and best case times are both nlogn.

No.
1) with respect to comparison sorts, very often quicksort is faster than merge sort.
2) we can sort this faster than nlogn if we don't use a comparison sort

Quote
I also prefer it because it is recursive :)

1) merge sort doesnt have to be recursive. any recursive algorithm can be written iteratively.
2) you seem to like selection sort since you mentioned that too. you can write that recursively. performance would be much worse, but then you'd like that even more since it's recursive.

Quote (slapnutz2284 @ Jun 1 2013 10:51pm)
lol, don't be mad just because your method was comparable to selection sort


are you reading the wrong post? mine looks nothing like selection sort. selection sort is O(n^2), mine is O(n+k) time with O(k) memory.

Quote
and a poor form of recursion.


again, i think you were reading the wrong post. my solution doesnt have any recursion.

Quote
try not to get so butt hurt when someone gives better advice than you carte.


Eep has given better advice in other threads than your advice of merge sort. you might as well as just recommended bogo sort for shits and giggles

This post was edited by carteblanche on Jun 1 2013 09:33pm
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Jun 1 2013 10:03pm
Quote (carteblanche @ Jun 1 2013 08:05pm)
http://www.troll.me/images/futurama-fry/not-sure-if-trolling-or-just-stupid.jpg


I guess we now know the answer... and it wasn't trolling.
Member
Posts: 3,321
Joined: May 20 2011
Gold: Locked
Jun 1 2013 10:04pm
lol, actually, quicksort and mergesort both have the same average and best time of nlogn, however, mersort has a worst case of nlogn and quicksort has a worst case of n^2. Also, are you completely retarded? Go find Selection sort on wiki or something and read what you posted, it is selection sort. Selection sort: iterate through each index of the array and find its appropriate position in the array and place it there by comparing it to the other elements in the array. If you were talking about quick sort, you would have stated that you pick a pivot point, usually at random, and move the integers that are less than that to the left of the pivot and integers greater to the right and then repeat that process recursively on the subsets of data (the left and right partitions created). Go back to school and demand a refund.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Jun 1 2013 10:06pm
Quote (slapnutz2284 @ Jun 1 2013 11:04pm)
lol, actually, quicksort and mergesort both have the same average and best time of nlogn, however, mersort has a worst case of nlogn and quicksort has a worst case of n^2.  Also, are you completely retarded?  Go find Selection sort on wiki or something and read what you posted, it is selection sort.  Selection sort:  iterate through each index of the array and find its appropriate position in the array and place it there by comparing it to the other elements in the array.  If you were talking about quick sort, you would have stated that you pick a pivot point, usually at random, and move the integers that are less than that to the left of the pivot and integers greater to the right and then repeat that process recursively on the subsets of data (the left and right partitions created).  Go back to school and demand a refund.


I won't even bother arguing with this guy, so full of stupid.
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Jun 1 2013 10:10pm
Quote (slapnutz2284 @ Jun 1 2013 09:04pm)
lol, actually, quicksort and mergesort both have the same average and best time of nlogn, however, mersort has a worst case of nlogn and quicksort has a worst case of n^2.  Also, are you completely retarded?  Go find Selection sort on wiki or something and read what you posted, it is selection sort.  Selection sort:  iterate through each index of the array and find its appropriate position in the array and place it there by comparing it to the other elements in the array.  If you were talking about quick sort, you would have stated that you pick a pivot point, usually at random, and move the integers that are less than that to the left of the pivot and integers greater to the right and then repeat that process recursively on the subsets of data (the left and right partitions created).  Go back to school and demand a refund.


lolololololololol.

i mean i kind of want to put you out of your misery, but you're providing us with so much entertainment.

This post was edited by irimi on Jun 1 2013 10:11pm
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Jun 2 2013 02:36pm
Quote (carteblanche @ Jun 1 2013 10:30pm)
i was giving you the benefit of the doubt by assuming you were trolling. but i guess i was wrong. should i point out everything wrong that you said?


No.
1) with respect to comparison sorts, very often quicksort is faster than merge sort.
2) we can sort this faster than nlogn if we don't use a comparison sort


1) merge sort doesnt have to be recursive. any recursive algorithm can be written iteratively.
2) you seem to like selection sort since you mentioned that too. you can write that recursively. performance would be much worse, but then you'd like that even more since it's recursive.



are you reading the wrong post? mine looks nothing like selection sort. selection sort is O(n^2), mine is O(n+k)  time with O(k) memory.



again, i think you were reading the wrong post. my solution doesnt have any recursion.



Eep has given better advice in other threads than your advice of merge sort. you might as well as just recommended bogo sort for shits and giggles


I love you too. Also shoutouts to radix sort, read about it last night.
Member
Posts: 16,218
Joined: Sep 27 2009
Gold: 13.00
Jun 3 2013 02:08am
Dichotomy sort will be far better for you, and easier to establish.

This post was edited by Bremen on Jun 3 2013 02:08am
Go Back To Programming & Development Topic List
Prev123Next
Add Reply New Topic New Poll