Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The second pop is redundant. We only need the min value in numbers, we don't need to pop it.
Well, it makes a change in the original list so it doesn't answer the problem.
thanks for your reply. if the problem was big then I would make a copy. for a simple problem like this i think it is ok. But copying list is always a good practice.
Using index method is a great idea! Thanks for inspiring me. Maybe you could make a Copy of the array,leaving the array unchanged.