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
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.
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..
@@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
your explanation is not quite right , class Solution { public int[] plusOne(int[] digits) { int n=digits.length; int[] nums={0}; for (int i=n-1;i>=0;i--){ if(digits[i]
Strings Programming Questions: ua-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!
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]
Why are you not solving in Leetcode , In Leetcode this code didn't pass all test cases
But it is solving all cases
I applied same code and my test cases are passed brother .
I love the way you explain these problems. thank you
didi yaar logics nahi ban rahe kya karu pls help karo itne easy questions ke logic bhi nahi soch pa raha
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
Great explanation please continue this series its really helpful
Very good, but hard to understand for beginners. However you are the best teacher!
what if [9,9]
Let's see
create a new array
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.
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..
@@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
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...
while input is 0 it is giving [1,0] it should only give [1]
Hi...its returning 1 only...Please take the code from git and try it out..
@@TechnosageLearning [1,0]
@@dhruvmahajan6345 check the for loop once
what about the cases of {9, 9} or {9,....,9} ?
Hi..It will return the output as {1,0,0,0,0,0} which is correct output
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
what about if the nos are 99, 999, ...?
Amrutha why u r writing
less than 9 condition makes it very simple..Listen the video again and try..You will definitely understand the conditions
it cannot work on array {0) plz correct code
What is the time and space complexity of this solution
Kindly please tell me why you have converted this array into String type😅
so that you can print an array without running a loop
Amazing....you think way too straight ahead... If I show you my attempt, you will laugh 🙂...thnx...
github repo link?
Super logic🎉
your explanation is not quite right ,
class Solution {
public int[] plusOne(int[] digits) {
int n=digits.length;
int[] nums={0};
for (int i=n-1;i>=0;i--){
if(digits[i]
can we have 3 sum leet code solution
newNumber[0]=1 then newNumber[1]=?
Will be 0 as it is not assigned
Thanks for making this video
Thanks
Amruta I need string programs
Leetcode string programs?? Or any String programming questions??
Any string program s
Strings Programming Questions: ua-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!
No this code not pass all cases pls don't give us wrong code
@@KP_PlAYS191 All the codes on our channel have been tested on leetcode first..
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]
wrong code
😍
99 pe galt ans ayega
Nhi ayega galat ans..It will return {1,0,0} which is a correct output!
Thanks!