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.
stringname.splitlines()
So, the way it is presented, maze is the string variable that holds the maze. If you create a list called splitmaze, for example, you could:
splitmaze = maze.splitlines()
same
I can define "python programmer" as a programmer who does Python.
I can't define "normal programmer". Could you explain what or who a "normal programmer" is?
I'm sure I haven't said anything offensive to you...
In my previous comment I have stated that you're incorrect about "multiple dict look-ups" and stated my opinion about
[::-1]
andreversed()
. If you think I was correcting you, then I can't help in any way ¯\_(ツ)_/¯Wrong, it's code repetition (
dict[c]
), not multiple dictionary lookups.A Python programmer always knows what
[::-1]
means, moreover it's safer because it always returns a structure, not an iterator which may need to be additionally converted to list.Yes, both the solution and reference run for 4.5 sec resulting in 9 sec altogether.
@monobrawl: If you're talking about my message in the discourse, I talked about that algo. But the annonced time was earlier in the history of the kata, with less demanding tests. It behaves the same as your solution. Myjinxin's one is a bit faster.
I think you forget do divide this time by 2, because 50% of the time is user's solution and other 50% of the time is the reference solution.