No.leofox wrote:can i make one in basic? Without using the list sort functions of course.
Question about the 'Sort that array'
Moderator: MaxCoderz Staff
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
Nah, mine runs thourgh the array checking every possible key swaps them into proper place. Since there aren't many keys (there is only a max 255) it's more efficient if the array is quite large, so I guess its more like n*k.Is your algo also a stupid sort? I saw CoBB made one.
I'm gonna try a fast heapsort, I don't know how quicksort could work on calc without using extra memory.
Same general idea I had, only I wanted to win the prize for "Most Grotesque Abuse of the Stack". :-)Jim e wrote:Nah, mine runs thourgh the array checking every possible key swaps them into proper place. Since there aren't many keys (there is only a max 255) it's more efficient if the array is quite large, so I guess its more like n*k.
http://sigma.unitedti.org/ -- Really cool content... when I get around to uploading it.
..is it over..? Why hasn't a winner been declared or anything..?
I've been on vacation, and I see I missed this entire thing. Too bad, I just passed the algorithms and complexity class, and would have liked to join the contest (Not that there's any point to that anymore )
I've been on vacation, and I see I missed this entire thing. Too bad, I just passed the algorithms and complexity class, and would have liked to join the contest (Not that there's any point to that anymore )
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- kv83
- Maxcoderz Staff
- Posts: 2735
- Joined: Wed 15 Dec, 2004 7:26 pm
- Location: The Hague, Netherlands
- Contact:
As simple as that may sound, it isn't. How do you compare the functions in speed of sorting a array? A routine heavinly depends on the array when it comes to speed. One routine may sort a half-sorted array faster than almost-sorted array, and the other routine sorts a almost-sorted array faster than the half-sorted... you see what I mean?threefingeredguy wrote:Just get a table that says the clock spped of each asm function and add them up.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Ah yes, my method would only work when they are all sorting the same type of sort the same number of times. My apologies. Is the interrupt frequency constant, because then you could use that. Or you could test them on an 84+ and read in the current clock time, then run the program, then read in the cloc time at the end.