Ad
  • Custom User Avatar

    clean, clever and quite readable.

    Just wondering what Big O notation in terms of space and time your solution would be.
    I would guess that Big O notation in terms of time would be O(n*m), where n is size of input and m is size of markers.
    About Big O notation in terms of size complexity it would be just O(1), constant as no variables are explicitly declared in function ? Can someone please correct me ?

  • Custom User Avatar

    When I see these answers I feel that I'm Stupid 😒😕😑😑😑😑