r/CodingContests • u/b0b0b0b • Feb 03 '11
Al Zimmerman programming challenge - arranging a deck of cards (with prizes!)
http://azspcs.net/Contest/Cards
3
Upvotes
r/CodingContests • u/b0b0b0b • Feb 03 '11
View all comments
Show parent comment
1
u/AlexFromOmaha Feb 03 '11
Sure, and that works great when you can eyeball the correct answer. It's irrelevant when you don't know what the answer is. To solve for 97 from a purely naive standpoint, the worst case is moving on average half of the elements in a 97 element array some unknown (but large) number of times over 97! iterations. Not gonna happen. Needs somethin' better.