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

  • Default User Avatar

    Your solutions are always the most effiectent and I always learn a lot from them. Thank you:)

  • Default User Avatar

    newbie here. It seems something wrong with your solution. I think the variance res should be transformed into int type(Python 3.6.0)