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.
asymptotically pythonic
I would suggest the author link to something like this in the description:
https://en.wikipedia.org/wiki/Bitwise_operation#OR
You must do the sort in place, that means you should reorder the elements of the input list, not delete its elements, only change their order.
Yes I delete the input list but before I added the integer in a new list "lista_final" , and that list is the return of the function
Thanks in advance!
The function must sort the input list in place.
When you do "del a[min_pos]" you are deleting the input list: this is why you get empty lists in tests.
The sorting must be done "in place" on the input list. Nothing should be returned.
Aha! I didn't read the question properly.
Should sort "in place", "don't return anything". Got it!
Maybe this detail should be emphasized, put in bold in the description of the problem. I see many people, like me, misunderstand.
this kata really cool, first solution is awesome, really needs to know algorithms
Case #1
solution arr: [5454, 1, 65, 2, 65, 4, 34, 4, 6, 5, 5, 5]
The list is not wave-sorted
Case #2
solution arr: [100, 17, 81, 19, 69, 22, 61, 25, 54, 37, 49, 47, 48]
The list is not wave-sorted
They look wave sorted to me. Where are these not wave sorted?
🤦
This comment is hidden because it contains spoiler information about the solution
Very clearly done and helpful.
After finishing my own solution and reading this one, I did "Train Again" to try and duplicate this solution from memory.
I was able to write it without errors the first time!
It felt like a 'hole in one' for me, to write a solution without typos.
if @cwhy "marked first", does that mean that he can correct the incorrect solution that is connected to all the upvotes?
Somehow this verifiably incorrect solution has not been deprecated. (just "train again" and cut and paste the code)
Maybe CW'ers can upvote our favorite challenger-solutions below, and/or remove our upvotes for this solution?
I'm curious if there's an alternative appropriate way that the incorrect code could be deprecated.
thanks! :)
Loading more items...