Two Sum II - Input Array Is Sorted (LeetCode 167) | Neetcode 11 / 150 | Bharath Chandra (Telugu)

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024

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

  • @bharathh_chandraa
    @bharathh_chandraa  หลายเดือนก่อน +3

    Corrected Pseudocode for 1 based indexing
    i = 0, j = n - 1
    while i < j
    if nums[i] + nums[j] == target
    return {i+1, j+1}
    else if nums[i] + nums[j] > target
    j-=1
    else
    i+=1
    return {}

    • @enjoyeducation498
      @enjoyeducation498 หลายเดือนก่อน +1

      Bro ee test case deggara error vastadi [3,2,4]
      6
      Output:
      [0,2]
      Expected:
      [1,2]

  • @marvelmania7195
    @marvelmania7195 หลายเดือนก่อน +2

    Lucky to have you in telugu DSA community

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

    Well explained on two sum problem statement, tq Bharat

  • @maheswara_pradeep8235
    @maheswara_pradeep8235 หลายเดือนก่อน +2

    Bro. You always keep reminding me to solve the question and try it before seeing solution. Thank you so much ❤

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

    Bharat, love babbar 450 questions kuda solve cheyava, this would be great help for future generations.

  • @shaikhanuman8012
    @shaikhanuman8012 18 วันที่ผ่านมา

    Hi Bharat, Could make video on "Minimize the Heights II" problem.

  • @shaiksadiq5493
    @shaiksadiq5493 หลายเดือนก่อน +1

    Love u Anna ❤️❤️

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

    I hope you post the video every single day , it helps who are near to there placements

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

    bro...........binary search video cheyandhi

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

    we are lucky

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

    Super

  • @Manjith-1887
    @Manjith-1887 หลายเดือนก่อน

    Sliding Window Detailed Video Please

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

      2 Pointer Video lo model 2 kindha sliding window already cover chesesam Manjith. Aa model saripovaali problems ki, inka avasaram padtundi anipisthe next level manadi Sliding window ne so video release chestha

    • @Manjith-1887
      @Manjith-1887 หลายเดือนก่อน

      @@bharathh_chandraa ok anna 👍

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

    Hi Bharath, How r u? no videos last two day? hope you well.

    • @bharathh_chandraa
      @bharathh_chandraa  หลายเดือนก่อน +1

      All good brother. How are you?
      Got busy with something else, you can expect consistent uploads this week.

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

    class Solution:
    def twoSum(self, numbers: List[int], target: int) -> List[int]:
    i=0
    j=n-1
    while itarget:
    j-=1
    else:
    i-=1
    ile "/box/script.py", line 19
    return [i+1,j+1]
    ^^^^^^^^^^^^^^^^
    SyntaxError: 'return' outside function
    anna ela error vasthundhi

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

      Indentation anni places lo same undaali Yamuna. So while loop tharavatga if condition ki enni spaces vadhilaavo, if condition tharavatga return ki kooda anne spaces vadhalaali.
      Chatgpt ni adugu code sari chesi ela chesindo kooda cheptadi

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

      Ok anna thank u

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

      @@bharathh_chandraa vachindhi anna, adhi nenu def tharvatha identation vadaledhu