Ad
  • Custom User Avatar

    you mean it evaluates to string each loop thus having O(n^2) time complexity

  • Custom User Avatar

    Tbh performance is sometimes not as much of a concern as clean readability that Linq provides. Practicing and working with Linq will be a skill you can easily use on many future projects whereas a custom parser will take extra time for minimal returns on something like a kata.

  • Custom User Avatar

    It all depends on what the requirements are.
    For small input sizes Linq and regular expression based solution is likely great.
    For large input size and/or performance sensitive pieces of code, custom parsing might be required.