Remove Duplicates from Sorted Array II | Leetcode 80 | Array

  Рет қаралды 39,584

Ayushi Sharma

Ayushi Sharma

Күн бұрын

Time Complexity : O(n)
Space Complexity : O(1)
Problem Link : leetcode.com/p...
C++ Code Link : github.com/Ayu...
Java Code Link : github.com/Ayu...
Please like, share and subscribe if you found the video useful. Feel free to ask in comments section if you have any doubts. :)
#DataStructuresAndAlgorithms
#RemoveDuplicatesFromSortedArray
#interviewpreparation
Remove Duplicates from Sorted Array II solution
Remove Duplicates from Sorted Array II Leetcode
Remove Duplicates from Sorted Array II C++
Remove Duplicates from Sorted Array II Java
Remove Duplicates from Sorted Array II Python
🔥🔥🔥🔥👇👇👇
Join telegram channel for more updates on placement preparation : t.me/AyushiSha...
Checkout the series: 🔥🔥🔥
👉Interview Experiences : • Interview Experiences
👉 Array: • Arrays
👉 Linked List : • Linked List
👉 Heap : • Heap
👉 Recursion : • Recursion
👉 Stack and Queue : • Stack And Queue
👉 Greedy : • Greedy
👉 Dynamic Programming : • Dynamic Programming
👉 Leetcode contests : • Leetcode contests
👉 Leetcode June Challenge : • Leetcode June Challenge
👉 Leetcode July Challenge : • Leetcode July Challenge
LIKE | SHARE | SUBSCRIBE 🔥🔥😊

Пікірлер: 93
@dbm103
@dbm103 9 күн бұрын
wow! well explained. I was not getting the approach to solve this. Thanks a lot!
@AyushiSharmaDSA
@AyushiSharmaDSA 9 күн бұрын
Glad it helped! thank you :)
@AjayGaulia093
@AjayGaulia093 6 ай бұрын
class Solution { public int removeDuplicates(int[] nums) { int arraySize = nums.length; /** Edge case */ if(arraySize
@debjeetmukherjee1297
@debjeetmukherjee1297 Жыл бұрын
The code is : class Solution { public int removeDuplicates(int[] nums) { int i=0; for(int e=0;e
@adilkevin6220
@adilkevin6220 2 жыл бұрын
Your explanation is good. Please explain constraint before you move on to the solution. Many people don't bother to see the constraint which will end up in TL. By doing these viewers Space and Time Complexity concepts gets cleared
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Adil, sure will explain constraints also, :)
@AnandhS-ll2uu
@AnandhS-ll2uu 11 ай бұрын
thatks a lot mam....it helped me well....your explanation was nice and clear thank you once again
@AyushiSharmaDSA
@AyushiSharmaDSA 9 ай бұрын
welcome Anandh, glad you liked it :)
@prithvi3980
@prithvi3980 Жыл бұрын
Good Dry Run, Able to understand... Thanks
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
Glad it helped😊
@jamesroy9027
@jamesroy9027 2 жыл бұрын
your voice is really beautiful
@manishsahu6873
@manishsahu6873 2 жыл бұрын
Thanks .. When you are in doubt with the problem and your video shows up.. perfect..
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Manish, glad it was helpful :)
@Satya-g5t
@Satya-g5t Ай бұрын
nice explanation, 😀
@AyushiSharmaDSA
@AyushiSharmaDSA Ай бұрын
Thanks! 😃
@PogalaHarshitha
@PogalaHarshitha 2 күн бұрын
thanks akka its very clear for me
@AyushiSharmaDSA
@AyushiSharmaDSA 2 күн бұрын
welcome, glad it was helpful :)
@ashishkumarshawhitchem2017
@ashishkumarshawhitchem2017 2 жыл бұрын
I use this Concept to solve LeetCode Problem -26,27,80
@basquiatttt
@basquiatttt 8 ай бұрын
Amazing that you've done it using a single loop! Good job!
@shreyasg817
@shreyasg817 Жыл бұрын
thanks ayushi great explanation 🙂🙂🙂🙂🙂
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
Welcome Shreyas, glad u liked it 🤗
@shadowaj9278
@shadowaj9278 2 жыл бұрын
Just fell in love...... With your tutorials 😅
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
🙂🙂
@shadowaj9278
@shadowaj9278 2 жыл бұрын
@@AyushiSharmaDSA 😁😁, mam please bring some trie questions , struggling alot with those 😭
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
@@shadowaj9278 sure sure :)
@shadowaj9278
@shadowaj9278 2 жыл бұрын
@@AyushiSharmaDSA thank you mam
@vinayjoshi8714
@vinayjoshi8714 5 ай бұрын
Great explanation dii 🤩
@AyushiSharmaDSA
@AyushiSharmaDSA 4 ай бұрын
thank you :)
@niteenautade
@niteenautade 2 жыл бұрын
Very well explained
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Niteen :)
@sagarbora7768
@sagarbora7768 2 жыл бұрын
Hi Ayushi are we also required to change the given array ?????
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Yes Sagar, we are changing in the given array only :)
@girikgarg8
@girikgarg8 2 жыл бұрын
Ma'am I wasn't able to approach this question....so should I practise more questions on two-pointers tag?
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
See this is one type of two pointer, now you know this type, if you feel that you need more practice, then you can practice more problems :)
@111rhishishranjan2
@111rhishishranjan2 Жыл бұрын
very good, very very helpful
@AyushiSharmaDSA
@AyushiSharmaDSA 5 ай бұрын
thank you, glad it was helpful :)
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 2 жыл бұрын
Thanks a lot for such a great explanation, Ayushi 😇
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Chandra, glad it was helpful 🙂
@ambikaarora8736
@ambikaarora8736 2 жыл бұрын
Awesome explanation.. Thanks :)
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Ambika, glad it was helpful :)
@mdsahil2203
@mdsahil2203 Жыл бұрын
Great explanation ma'am . It was helpful for me😇
@AyushiSharmaDSA
@AyushiSharmaDSA Ай бұрын
thank you Sahil, glad to hear that ❤❤🤗🤗
@Leetcore-2508
@Leetcore-2508 2 жыл бұрын
Explanation and dry run is just so perfect...!!! 👌
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Siraj, glad it was helpful :)
@DarthVader678
@DarthVader678 8 ай бұрын
dry run along with explanation is indeed so important for interviews!
@girikgarg8
@girikgarg8 2 жыл бұрын
Ma'am this was a sorted array.... so couldn't a binary search approach work here?
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
See binary search is done if we have to search something or if it's binary search on answer concept, so here we do not have to search, so binary search will not be useful :)
@Harshit_yt1204
@Harshit_yt1204 Жыл бұрын
great explanation.
@AyushiSharmaDSA
@AyushiSharmaDSA Ай бұрын
thank you Harshit :)
@ishangujarathi10
@ishangujarathi10 Жыл бұрын
loved the intuition
@hahahahaha3121
@hahahahaha3121 Жыл бұрын
what does " for(auto e:nums) " means? Can you tell the topic in which it is covered
@princiagrawal1428
@princiagrawal1428 Жыл бұрын
auto is just like a common data type .... it will help u to access the elements of a data structure like here e is indicating to each element of nums
@JackCoderr
@JackCoderr 9 ай бұрын
range based loop
@samyakagarwal1777
@samyakagarwal1777 Жыл бұрын
best explanaiton
@AyushiSharmaDSA
@AyushiSharmaDSA 5 ай бұрын
thank you, glad it was helpful :)
@SambhavAgarwalBCE
@SambhavAgarwalBCE Жыл бұрын
WE CAN USE HASHMAP ALSO
@AbhishekGupta-cr1mf
@AbhishekGupta-cr1mf 2 жыл бұрын
Ohh.. thanks Aayushi, I came from LinkedIn! BTW very good explanation skills
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Hi Abhishek, thank you so much :)
@ecs185_shaileshbharti3
@ecs185_shaileshbharti3 2 жыл бұрын
Perfect explanation 💯🔥
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you :)
@AnshuKumar-zn1qb
@AnshuKumar-zn1qb 2 жыл бұрын
Great explanation. It was helpful for me😇
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Anshu, glad it was helpful :)
@himanshusaha6340
@himanshusaha6340 2 жыл бұрын
Can anyone tell me is this a greedy approach???
@bhaveshjhawar9532
@bhaveshjhawar9532 Жыл бұрын
thanks alot ma'am
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
Welcome Bhavesh :)
@vishalkharadevk
@vishalkharadevk 2 жыл бұрын
New thumbnail theme looks better.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you Vishal :)
@ankitaburbure8142
@ankitaburbure8142 Жыл бұрын
I didn't get one thing..where in the question is given at most twice?
@safariyakm
@safariyakm 6 ай бұрын
I think you are talking abt the 26th leetcode question (unique element appears only once). But she's solving the 80th question (unique element appears at most twice).
@adilkevin6220
@adilkevin6220 2 жыл бұрын
Please make a video on largest subarray with 0 sum
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure :)
@darshankalathiya8667
@darshankalathiya8667 2 жыл бұрын
very nice ..
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Darshan 😊
@reenayadav8468
@reenayadav8468 2 жыл бұрын
Thank you di 🙌
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Reena, glad it was helpful :)
@iuashrafi
@iuashrafi Жыл бұрын
Thank you
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
You're welcome😊
@apnaaddaSwaraj
@apnaaddaSwaraj 2 жыл бұрын
Mam can you teach me please from start or make a class course
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Hi, actually I can teach only through youtube as of now, Sorry :)
@priyamagarwal7754
@priyamagarwal7754 2 жыл бұрын
Ayushi sharma please make a video on Largest Rectangle in Histogram leetcode 84 and please accept request on linkedin.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure :)
@sreeram_chenchu_kumar.8759
@sreeram_chenchu_kumar.8759 2 жыл бұрын
nice
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks🙂
@rajdave7357
@rajdave7357 2 жыл бұрын
Thanks🙏🙇
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Raj, glad it was helpful :)
@anandprakashchaudhary2358
@anandprakashchaudhary2358 2 жыл бұрын
Keep make video
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Anand, sure :)
@plutomessi21
@plutomessi21 Жыл бұрын
didi you reply on everyone's comment
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
hey, is it a question or a statement, bit unclear 😅
@plutomessi21
@plutomessi21 Жыл бұрын
@@AyushiSharmaDSA my bad didi, it was a statement 😂 and thank you for the reply🥹
@AyushiSharmaDSA
@AyushiSharmaDSA Жыл бұрын
@@plutomessi21 Arey 🥹❤️
@bhuvi_iitkgp
@bhuvi_iitkgp Жыл бұрын
insta i'd ??]
Remove Duplicates from Sorted Array II - Leetcode 80 - Python
12:19
Remove Duplicates From Sorted Array | Brute | Optimal
10:47
take U forward
Рет қаралды 130 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 608 М.
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 8 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 2,9 МЛН
LeetCode in Java | Easy Question | Remove Duplicates from Sorted Array
14:49
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
Remove Duplicates from Sorted Array - Leetcode 26 - Python
10:38
Remove Duplicates from sorted Array
21:22
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 171 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 582 М.
Merge Sorted Arrays Without Extra Space | 2 Optimal Solution
32:47
take U forward
Рет қаралды 202 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 608 М.