Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    Doesn't handle:

    • empty list
    • bad data where list has elements of None
  • Custom User Avatar

    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.