I have an array with a size that I dont know(mostly a size of a 10),
that most of it has 1’s and 2’s, but sometimes 3’s and 4’s…
I cant buble sort, because the order is importhan, but other then that, I can do everything
Thanks 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Iterate over the array until you hit your break condition.
While iterating (use the
fororwhileloop), remember the highest value so far and compare against current.