678. Valid Parenthesis String | LeetCode Solution | Java Solution with Time and Space Complexity

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024
  • This is the most frequently asked interview question.
    And has been asked in many top product based companies like #amazon, #microsoft etc.
    For 1:1 connect with me on topmate: topmate.io/con...
    #amazon #microsoft

ความคิดเห็น • 6

  • @antrapurohit8010
    @antrapurohit8010 ปีที่แล้ว

    Hi Shrayansh, you choose really good questions. Can u please tell me how do you choose them

    • @JainShrayansh
      @JainShrayansh  ปีที่แล้ว

      its previously asked question by Google, Microsoft, FB companies etc.

    • @abhishekkumar-fe8lw
      @abhishekkumar-fe8lw 6 หลายเดือนก่อน

      @@JainShrayansh like the other hundreds of questions

  • @preetnandeshwar5331
    @preetnandeshwar5331 9 หลายเดือนก่อน

    for 2nd solution
    eg. " )(* "
    expected ans - False
    as per soln - True
    i think second solution is not valid

    • @Omchaudhary07
      @Omchaudhary07 7 หลายเดือนก่อน

      @preetnandeshwar5331 see when first character is ')' [closing bracket] then according to the condition minleft= max(0,minleft-1) so minleft=0 and maxleft=maxleft-1 so maxleft=-1 after that at last one condition is there if(maxleft

  • @Chill_Magma
    @Chill_Magma ปีที่แล้ว

    type hindi on title