4 ms·
Quicksort in Scheme and C: First post in a project to be a better programmer
- rathboma 17y agoI'm going to make a whole bunch of core algorithms in at least 2 languages per algorithm to help drill the basics into me. You guys think this is a good tactic to make yourself better at something?
- notaddicted 17y agoTry it and see!
- cperciva 17y agoYour pivot selection is buggy in your C version. Think about what's likely to happen with p = 90, r = 100.
- rathboma 17y agoYeah, you're right. I threw it together really quickly, I think I'll just replace the randomized partition with a regular partition call.