[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
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /adv/ - Advice

Thread replies: 8
Thread images: 1
File: 180px-Lanky.png (45 KB, 180x188) Image search: [Google]
180px-Lanky.png
45 KB, 180x188
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

banner
banner
[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.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.