LONGEST COMMON PREFIX | LEETCODE # 14 | PYTHON SOLUTION

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • LINK: leetcode.com/p...
    Simple string based problem that is used as a common warm-up problem. Relatively straightforward logic, just need to vertically compare the characters until we get a mismatch or a given string ends.

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

  • @svsk634b
    @svsk634b 3 วันที่ผ่านมา

    Correct my logic please, if I am wrong. For each character iterating through strs over and over again, wouldn't that be O(S^2)? Given the constrains 1

  • @suri4Musiq
    @suri4Musiq 5 วันที่ผ่านมา

    Are you preparing for interviews?

    • @crackfaang
      @crackfaang  4 วันที่ผ่านมา

      No just making videos of popular questions and trying to force myself to make at least 1 video a day to grow the channel