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.
There are plenty of solutions in python without any imports. If you are frustrated, forfeit and have a look at the solutions, some are quite clever.
This comment is hidden because it contains spoiler information about the solution
Yes, most-connected-to is not a way to go. You need to think of something different.
Did not like this AT ALL. Guessing at algo, I went thru hassle of removing
most-connected-to-nodes, but at end, if there's a diamond,
impossible to tell inner from outer.
This comment is hidden because it contains spoiler information about the solution
Last line of the kata:
The array will never be empty.
Also 8th kyu kata are introductory, so error handling would be too advanced for this kata.
Good for you and all but the whole reason I'm using python here is to do dumb shit like this.
I have more than enough readable code with my job, this is purely for fun.
I've had to come in behind people who coded like this and spend hours and hours writing test cases then refactoring it so the poor schmo who came along behind me could read the darn thing. As entertainment, sure, fine. As production code, if I managed or team-led someone who did this I'd have a long conversation with them about what their goals were and how that matched with the organization's goals.
Doesn't handle:
Is that better? :D
https://www.codewars.com/kata/reviews/60219724ec17200001a89d56/groups/6024fe54c5d1a00001d04c19
this is utterly non-obvious to the poor schmo who comes along after you.
Taking 10 minutes to analyze 2 lines of code won't make you any friends.
Your mission, should you choose to accept it, is to create something blindingly obvious to a casual observer.
Zero points given for terse code.
Partial credit possible if terseness required due to extreme and user-experience-altering runtime inefficiency.