[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

Last resort programming help


Thread replies: 8
Thread images: 1

File: 180px-Lanky.png (45KB, 180x188px) Image search: [Google] [Yandex] [Bing]
180px-Lanky.png
45KB, 180x188px
I know this is more of a stack overflow question I know, but unfortunately my question got ignored there.

http://pastebin.com/Ccv4KP3j

I have to create and implement a quick sort and for some reason it just returns an array in the same order.
>>
what language?
>>
>>16852186
English
>>
>>16852186
C, sorry.
>>
>>16852194

if i wasnt blackout drunk i would throw this into netbeans and try and figure it out. sorry, i dont know C that well either way. try 420chans /prog/ board they're pretty helpful. good luck anon
>>
Step through the code. Alternatively print every time you find a swap to make. You can also try with smaller cases. >>>/g/dpt is fairly helpful when they're not arguing about i++ vs ++i
>>
>>16852217
Wait a sec this is fairly obvious. Look at when you swap. You only swap after the for loop is done. That's not how I remember quicksort
>>
>>16852222
Nevermind. Too drunk.
Thread replies: 8
Thread images: 1
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK