2825. Make String a Subsequence Using Cyclic Increments | leetcode daily challenge | shashcode

  Рет қаралды 895

shashCode

shashCode

Күн бұрын

Пікірлер: 13
@shashwat_tiwari_st
@shashwat_tiwari_st 11 күн бұрын
day 4 / 30. Kya aaplog ka code bhi 43% faster dikha rha hai? Like target is 150, please do like if you have understood the explanation as well as the code.😄
@rajaryanbehera8628
@rajaryanbehera8628 11 күн бұрын
Sir, I want to thank you that for your efforts and consistency as after following your channel I got good knowledge on variety of binary search, sliding window, two pointer, different functions of java and most important GRAPH. and also I created some projects which lead me to get a placement in a product base company with good salary. Thank you sir I pray that you get what you want in your life and be happy through out your life. And this doesn't mean that I will end my leetcode journey here. I will continue to learn from you and also I am doing daily challenge also and also practicing more DSA because practice must go on.. THANK YOU SIR🙏
@shashwat_tiwari_st
@shashwat_tiwari_st 11 күн бұрын
@@rajaryanbehera8628 congratulations, your hardwork paid off 👏 🙌 🎊✨️♥️
@rajaryanbehera8628
@rajaryanbehera8628 10 күн бұрын
@@shashwat_tiwari_st Thank you sir
@akashkd7141
@akashkd7141 11 күн бұрын
thank y0u bhaiya
@mohit.j5554
@mohit.j5554 10 күн бұрын
🙌
@ravishanker_07
@ravishanker_07 11 күн бұрын
class Solution { public boolean canMakeSubsequence(String str1, String str2) { int count=0,ind=0; for(int i=0;i=str2.length()){ return true; } return false; } }
@mathongo1940
@mathongo1940 10 күн бұрын
class Solution { public boolean canMakeSubsequence(String str1, String str2) { int s1 = str1.length(); int s2 = str2.length(); if(s1
@PiyushSharma-we8yd
@PiyushSharma-we8yd 11 күн бұрын
😍😍😍
@akashkd7141
@akashkd7141 11 күн бұрын
is it possible for you to provide personal guideance, even if its paid also ok
@yashmatlani1976
@yashmatlani1976 11 күн бұрын
0ms -> 100% faster 2 Pointers Approach -> TC O(n+m) class Solution { public: bool canMakeSubsequence(string str1, string str2) { int l1 = str1.length(),l2 = str2.length(); int p1 = 0,p2 = 0; if(l2==1){ if(l1==1) return (str1[0]==str2[0]) || (str1[0]+1 == str2[0]) || (str1[0]=='z' && str2[0]=='a'); return str1.contains(str2[0]) || str1.contains(str2[0]-1) || (str1.contains('z') && str2[0]=='a'); } while(p1
@is_Debu
@is_Debu 11 күн бұрын
str1.charAt(i) == str2.charAt(j)-1 bhiya please explain this cond why add that it's not clear to me ?
@shashwat_tiwari_st
@shashwat_tiwari_st 11 күн бұрын
@@is_Debu same approach. Suppose z is present in str2 then either z or y should be present in str1. That's why we check by doing -1
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 68 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 20 МЛН
Are AI advancements already slowing down?
13:29
CNBC
Рет қаралды 325 М.
The CSS Display Property is Changing Forever
15:20
Web Dev Simplified
Рет қаралды 57 М.