Ad
  • Custom User Avatar
  • Custom User Avatar

    Agreed, I first solved it in Python and while I am fluent with most of the string methods after years of Python, I had forgotten about this one in absence of practice and solved it with less advanced features and alorithmic logic. Built-in methods are just masked hardwork of creators, and they can indeed be less efficient in cases and you would needa use your own logic!

  • Default User Avatar

    Iterate 2 times unnecessarily causes the script to be more inefficient...
    Using less lines of code does not mean writting good code...

  • Default User Avatar

    For those who did not resolve it that way... At the end of the day those like us who resolved this challenge with an actual algorithm, are the ones who create built-in methods. Actually built-in functions are just a mask hiding a larger code and guess what... Built-in methods might be much more unefficient than a customized algorithm...

    Less lines of code does not mean good code