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.
"Idk why my solution is not working" is not an issue.
It is about the way you're creating OrderedDict's.
OrderedDict is a dictionary where keys maintain the order in which they are inserted.
That means, you have to create OrderedDict, by giving it keys in the order you want them to stay.
Try to use for loop to do this.
When you solve this, rest of your code should be working with Python 2.7.6.
No Issue in this case.
Godspeed mate!
I would suggest trying to go about another approach. Wrong or right (obviously it is wrong) this code would not fare well in an interview due to readability and being overly complex. Keep up the effort :)
Print the input and you'll see what cases you're failing.
Attempt the kata instead of trying the sample tests.
Sample tests in Python are broken.
Got error.... what it has to do with my code?
NICE ONE.
First is there in case there is more than one string (or consecutive strings) with the same length.
By sying first isnt it supposed to be the first appear on list compare to to one before? :x
The word 'first' should be removed from the instructions ...
What are you talking about?
"oocccffuucccjjjkkkjyyyeehh"
is the longest string.['ejjjjmmtthh', 'zxxuueeg', 'aanlljrrrxx', 'dqqqaaabbb', 'oocccffuucccjjjkkkjyyyeehh'], 1
expected: oocccffuucccjjjkkkjyyyeehh
result: ejjjjmmtthh
why isn't ejjjjmmtthh the first longest string in the array?
its longer than zxxuueeg ... and its after him (k=1).
delete
The user doesn't exist anymore ¯\_(ツ)_/¯
Your solution is wrong.
Loading more items...