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.
This comment is hidden because it contains spoiler information about the solution
I think this would be faster than sorting. Assuming sorting takes O(nlogn) time, and removal takes O(n) time, O(n) < O(nlogn), hence it would be more efficient. Since we shouldn't modify the original array we can make a copy.
good to know. compared to sorted?
I did it the exact same way, seems the more logit but not the fastest! Anyone has tips to improve your coding abilities for speed??
.remove() takes a lot of time.
Nicely done, we could further refactor by using min(numbers) directly in the return statement for second_min
Thank you. I was also looking for a one-liner for my solution.
I refreshed on pop() vs remove().
This is the most readable solution.
Much better than the top one.
This comment is hidden because it contains spoiler information about the solution
Eh, I like this much really much.
Your parens and iparens are really intriguing. I'm impressed.
But I'm not sure it's a recommendable way because it's hard.
The problem specifically stated to not treat other delimiters as parentheses, though I guess it didn't test for it so
¯\_(ツ)_/¯
i dont see that mentioned in the instructions! although I agree that original list should not be changed. But it's not written in instructions
You should 'nt touch the original Array/List
From my understanding of python, when you remove an item from a list, python moves every number down. If the smallest number on the list is the one at index 0 then you have to move the whole list. It will still be in linear time, but it would be more efficient if you follow the directions and don't modify the list.
Loading more items...