Ad
  • Custom User Avatar

    Yep.
    But this solution solution was written in Python2 where using / between two integers meant integer division.

  • Custom User Avatar

    It's not a very good solution frankly speaking. It has complicated logic for dealing with substrings that start with the same letter (yet it's pretty easy to follow (for me) somehow, maybe the fact that I still remember why I coded it like this, helps me decipher the algorithm faster), and not efficient (it's O(n^2) due to nested loops and pop(0) - the hit on performance with the current tests is small, but it is indeed present).

    Though, if you still liked it, then thanks O_o