Hi y'all!
I need to sort an input of integers, long as we wish (not defined, depending on the user), which ends up by -1, and print it to the screen sorted. I can't think of anything that is simple enough to use (a beginners level, all we learned in the 4 lectures that we had was to the loops level, nothing too complicated). I know how to do it with arrays, or lists etc., but not without it. Any suggestion?
Thanks
YaelGD 0 Newbie Poster
Recommended Answers
Jump to Post>Any suggestion?
I'd suggest that you confirm the need to do this without any kind of list. This sounds more like make-work with unreasonable restrictions than a beginner's project. Since you claim that it's a beginner's project, it's more likely that you just didn't fully understand the requirements and have …
Jump to Post>Still wanna prove me wrong? :-)
You're still using an array, just without the convenience of array notation or the convenience of semantic guarantees that an array provides. Given a strict definition of "no arrays", your solution is invalid.
All 7 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
YaelGD 0 Newbie Poster
ArkM 1,090 Postaholic
YaelGD 0 Newbie Poster
jephthah 1,888 Posting Maven
Narue 5,707 Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.