1190. Reverse Substrings Between Each Pair of Parentheses Leetcode Editorial | Problem of the Day

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 6

  • @vishwajeetsingh209
    @vishwajeetsingh209 Před měsícem +2

    The time complexity of yours can be further reduced. Right .?

    • @03_utpallucky40
      @03_utpallucky40 Před měsícem

      Yes we can use indexing of string and will store in array in case of open parenthesis .

    • @AbhinavAwasthi
      @AbhinavAwasthi  Před měsícem +2

      Yeah, I think I missed some point

    • @03_utpallucky40
      @03_utpallucky40 Před měsícem

      @@AbhinavAwasthi already you are doing great job keep doing ..

  • @vishwajeetsingh209
    @vishwajeetsingh209 Před měsícem +1

    I guess you are not thinking of the time complexity. Time complexity is O(3*N)

    • @AbhinavAwasthi
      @AbhinavAwasthi  Před měsícem

      Yeah, I think I missed some point
      It will be O(n^2)