Plus one | LeetCode problem 66

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

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

  • @dhruvavishwakarma253
    @dhruvavishwakarma253 4 หลายเดือนก่อน +8

    Why are you not solving in Leetcode , In Leetcode this code didn't pass all test cases

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

      But it is solving all cases

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

    I love the way you explain these problems. thank you

  • @exactly4234
    @exactly4234 24 วันที่ผ่านมา

    Very good, but hard to understand for beginners. However you are the best teacher!

  • @kapilpachori2208
    @kapilpachori2208 ปีที่แล้ว +2

    Hey i want to know how you have mastered logic building i am a beginner and making logic of a particular problem takes a lot of time and sometimes even not getting the logic of a question at all plz give some tips.

    • @TechnosageLearning
      @TechnosageLearning  ปีที่แล้ว +9

      Hi
      It takes some time..Please continue your practice.. since you are a beginner, you can watch the solution and then solve yourself again ..when you will keep on practicing...you will get to know that same logics will repeat in multiple problems....and it ll start clicking automatically when you will see the problem..

    • @kapilpachori2208
      @kapilpachori2208 ปีที่แล้ว +1

      @@TechnosageLearning Thanks and beside logic building, what if I learn fundamentals of a particular ds & algo topic and solve leetcode problem of that topic, is this the optimal way of learning ds & algo

    • @TechnosageLearning
      @TechnosageLearning  ปีที่แล้ว +5

      Yeah..You can do that way also..Or may be solve the problems and keep learning the logics...So that you will cover all topics as well as problems...

  • @ashwinnair1035
    @ashwinnair1035 ปีที่แล้ว +1

    Great explanation please continue this series its really helpful

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

    hi,
    what is the meaning of dig[i]++;
    how it work.. can we written in any different way dig[i]= dig[i+1];
    Thanks
    Rajesh

  • @probeast267
    @probeast267 ปีที่แล้ว +1

    didi yaar logics nahi ban rahe kya karu pls help karo itne easy questions ke logic bhi nahi soch pa raha

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

      Keep solving more and more problems...ek din logics apne aap dimag me aane lagenge jab bht sari problems solve krne se bht sari approaches pta lag jayengi

  • @KRajesh-ej7dy
    @KRajesh-ej7dy ปีที่แล้ว

    Amrutha why u r writing

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

      less than 9 condition makes it very simple..Listen the video again and try..You will definitely understand the conditions

  • @KiranMB-yl1xl
    @KiranMB-yl1xl 7 หลายเดือนก่อน +5

    what if [9,9]

  • @divyarathi4739
    @divyarathi4739 ปีที่แล้ว +3

    while input is 0 it is giving [1,0] it should only give [1]

    • @TechnosageLearning
      @TechnosageLearning  ปีที่แล้ว +1

      Hi...its returning 1 only...Please take the code from git and try it out..

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

      @@TechnosageLearning [1,0]

    • @Aabbccddeeffgga2
      @Aabbccddeeffgga2 14 วันที่ผ่านมา

      @@dhruvmahajan6345 check the for loop once

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

    it cannot work on array {0) plz correct code

  • @sayanmoulick5307
    @sayanmoulick5307 ปีที่แล้ว +2

    what about the cases of {9, 9} or {9,....,9} ?

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

      Hi..It will return the output as {1,0,0,0,0,0} which is correct output

  • @AnchalMishra-g7u
    @AnchalMishra-g7u ปีที่แล้ว +2

    Kindly please tell me why you have converted this array into String type😅

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

      so that you can print an array without running a loop

  • @SudharsanAshwin-pf3oq
    @SudharsanAshwin-pf3oq ปีที่แล้ว

    What is the time and space complexity of this solution

  • @ashishp-c3i
    @ashishp-c3i ปีที่แล้ว +1

    Amazing....you think way too straight ahead... If I show you my attempt, you will laugh 🙂...thnx...

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

    Super logic🎉

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

    github repo link?

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

    newNumber[0]=1 then newNumber[1]=?

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

      Will be 0 as it is not assigned

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

    Thanks for making this video

  • @AhammedHussainShaik-x3h
    @AhammedHussainShaik-x3h 7 หลายเดือนก่อน

    can we have 3 sum leet code solution

  • @SravanKumar-cy8pp
    @SravanKumar-cy8pp ปีที่แล้ว

    Amruta I need string programs

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

      Leetcode string programs?? Or any String programming questions??

    • @SravanKumar-cy8pp
      @SravanKumar-cy8pp ปีที่แล้ว

      Any string program s

    • @TechnosageLearning
      @TechnosageLearning  ปีที่แล้ว +1

      Strings Programming Questions: th-cam.com/play/PLjOcsOwEjb135TKtYNgd08hnioIV-C1rR.html
      Here are few string programming questions..you can check it out.
      Working on more programs, Will upload soon.. Stay connected.
      Thanks!

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

    wrong code

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

    import java.util.*;
    class Main {
    public static void main (String [] args){
    int []nums={1,1,9};
    System.out.print(Arrays.toString(plusOne(nums))) ;
    }
    public static int[] plusOne(int[] digits) {
    int n=digits.length;
    for(int i=digits.length-1;i>=0;i--){
    if(digits[i]

  • @Rahulkumar-xb7so
    @Rahulkumar-xb7so ปีที่แล้ว +1

    99 pe galt ans ayega

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

      Nhi ayega galat ans..It will return {1,0,0} which is a correct output!
      Thanks!