Missing Number | LeetCode problem 268

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 26

  • @krishnaanandiswaraa
    @krishnaanandiswaraa Рік тому +2

    Best way of explanation. Whenever I have doubts on LeetCode problem, I come here and find solution with great explanation. Thank you for this much efforts.💕

  • @tianzhengmai1369
    @tianzhengmai1369 Рік тому +1

    This is the most very easy and efficient approach. Thank you.

    • @saaii9
      @saaii9 8 місяців тому

      Iam getting error i cannot be resolved to a variable

  • @AmitBiswas0142
    @AmitBiswas0142 8 місяців тому +1

    This is actually great the solution is much better than other

  • @skyisbluexd
    @skyisbluexd 10 місяців тому +1

    Tq so much. very clear explanation.

  • @urmilasharma5368
    @urmilasharma5368 Рік тому

    Great Explanation! Thank you so much...please keep uploading leetcode problems..

  • @KaisarAnvar
    @KaisarAnvar Рік тому

    This is a very interesting approach. Cyclic sort and follow up with locating the missing value also works too.

  • @Er.gamingx03
    @Er.gamingx03 3 місяці тому +1

    Simple and sweet explanantion ever seen;

  • @Omkar-fg4ws
    @Omkar-fg4ws 10 місяців тому

    thank you so much, your way of explaination is awesome

  • @Future_software_enginneer
    @Future_software_enginneer 10 місяців тому +1

    Nice and easy explained ❤😊 di
    #23/02/2024

  • @stmtyper
    @stmtyper 4 місяці тому +2

    if more than one number are missing then ?

  • @vamshisundupalle6141
    @vamshisundupalle6141 Рік тому

    wonderful approach

  • @NarasimhaRaoVasireddy-r3v
    @NarasimhaRaoVasireddy-r3v 3 місяці тому +2

    I have a doubt, In the for loop we are finding the SUM of given array which is cool, When we are doing the n(n+1)/2 formula- Here also we are checking the sum of nums array only (nums.length). I think we need to do do int n= nums.length+1; then int actualSum= (n*(n+1))/2 works. Is this approach correct. How it is showing correct output in your code is my confusion.

    • @shahidgulzar9497
      @shahidgulzar9497 2 місяці тому

      You are keeping eyes on the index only but thhe real thing is that the logic knows how many elements are the logic has defined elements of n but the indexing is only from 0 that can be mostly seen in the loop. I hope you get this.

  • @helloworld3975
    @helloworld3975 6 місяців тому

    amazing solution

  • @RavindraSingh-zg9eq
    @RavindraSingh-zg9eq Рік тому +2

    this asked me in yestarday interview

  • @GulshanKumar-rm2fz
    @GulshanKumar-rm2fz 6 місяців тому

    maam what if there is two missing number then this code will be failed

  • @Gautamk-m9n
    @Gautamk-m9n 2 дні тому

    int arr[]= {2,3,4,5,6,7}; this case it will fail above programme works only if array number starts with 1 for one missing number

  • @krishnaanandiswaraa
    @krishnaanandiswaraa Рік тому

    di plz tell me which graphic tablet you use plz its a humbel request plz plz plz plz plz

  • @sujatamahata3128
    @sujatamahata3128 Рік тому

    Nice

  • @souhardayasaha
    @souhardayasaha Рік тому

    bhai sab test cases nahi pass karta

    • @TechnosageLearning
      @TechnosageLearning  Рік тому

      Are sab pass ho rhe hai..Kaun sa ni ho rha..Tell me

    • @saaii9
      @saaii9 8 місяців тому

      @@TechnosageLearningnahi horaha he madam you are not intialize the value of i so that is the error i can not be resolved