1750. Minimum Length of String After Deleting Similar Ends | 2 Pointers | Edge Cases

  Рет қаралды 1,704

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 32
@BadalKumar-gv3xu
@BadalKumar-gv3xu 7 ай бұрын
good explanation
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Thank you Badal bhai 🥹❤️🫂
@mr_weird3680
@mr_weird3680 7 ай бұрын
Thanks brother
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0.
@mr_weird3680
@mr_weird3680 7 ай бұрын
Deletion can be happened irrespective of the length of the prefix and suffix. In the first iteration, prefix "aa" and suffix"a" is deleted followed by both b's at the ends leaving the resultant string "a" which is of length 1. According to you, if both a's at the end are deleted at once. Then the prefix and suffix will be different characters which will not further proceeded. For the deletion to be happened, both the prefix and suffix should be of same characters irrespective of their lengths.
@umatjeet8012
@umatjeet8012 7 ай бұрын
hey aryan one suggestion don't put method name like 2 pointers or dp in thumbnail , if any user want to solve that question he will already know it's solved by using this method. and love yout content it's way too good. keep it up
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0.
@harshal8781
@harshal8781 7 ай бұрын
Bro vo thumbnail me daalna imp be hai SEO me help karte hai keywords 🙂
@Sam__056
@Sam__056 7 ай бұрын
@@prabhashmeharia8003 you cant delete ab and ab from both ends as all the letters in the prefix should be equal and all the letters in the suffix should be equal it cant be 'ab' it has to be aaa bb cc ...
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Yes sir, thumbnail me nhi daal rahe but title me dalna important ho jaata hai, as how will someone know what all approaches will be covered in video, as people think its like any other youtube video, and I don’t even have any reach at all. Barely get views even🥹, thus think of adding at least all ways which we will discuss in video ❤️❤️🙇
@umatjeet8012
@umatjeet8012 7 ай бұрын
@@ARYANMITTAL I can understand u are putting this much effort still not getting views I have suggested your channel to every one of my friend 🤌 and I was talking about title not thumbnail mistakenly wrote thumbnail 😂
@TON-108
@TON-108 7 ай бұрын
Thank You Aryan Bhai 🗣
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0.
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Arey TON bhai, kaafi time baad dikhai diye 🥹🥹🫂
@TON-108
@TON-108 7 ай бұрын
@@ARYANMITTAL Comment nhi kiya bahut dino se 🥲, but aapka POTD ka approach dekhne daily aata hu 🫂
@learningmaths786
@learningmaths786 7 ай бұрын
thanks aryan
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0. Don't trust anyone blindly.
@san_sin
@san_sin 7 ай бұрын
bhaiya , your explanation is amazing
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Thank you so much 😀❤️❤️🫂
@debanjan10
@debanjan10 7 ай бұрын
Great Explanation Sir
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0.
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Thank you so much broo ❤️❤️❤️
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
prabhash bhai answer mila kyaa?? Kaafi jayada he comment maar diya aapne 😂😂😂
@harshdoiphode2249
@harshdoiphode2249 7 ай бұрын
while(i
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Did we tried running this ??
@AnshuHarshit
@AnshuHarshit 7 ай бұрын
Sometimes your double meaning (/ dark jokes) words made interesting to learn questions.🤣🤣🤣🤣
@ARYANMITTAL
@ARYANMITTAL 7 ай бұрын
Anshul bhai 😂😂💀🌚
@karthikraja8341
@karthikraja8341 7 ай бұрын
small change in the second while loop make it as while(j>i && s[j] == c) j--;
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
Take the below example s= "aababa" Expected ans showing is 1. But why can't we delete single 'a' from both the end and then delete 'ab' from both the end , in this way the length of rem string will be 0.
@karthikraja8341
@karthikraja8341 7 ай бұрын
@@prabhashmeharia8003 in this case you delete aa at the prefix and delete a at the suffix
@prabhashmeharia8003
@prabhashmeharia8003 7 ай бұрын
@@karthikraja8341 Why?
@karthikraja8341
@karthikraja8341 7 ай бұрын
@@prabhashmeharia8003 see the leetcode second example for the question
Introduction to C Language - Part-1 | C Language Tutorial
19:21
Naresh i Technologies
Рет қаралды 5 МЛН
How to Check if a User Exists Among Billions! - 4 MUST Know Strategies
12:44
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 116 МЛН
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 611 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,2 МЛН
I Asked LinkedIn Software Engineers How To Get Hired
10:49
Namanh Kapur
Рет қаралды 249 М.
Leetcode Visualized: 581. Shortest Unsorted Continuous Subarray
13:47
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 560 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 122 М.