How To Remove Duplicates From Sorted Array ( LeetCode 26 ) | FREE DSA Course in JAVA | Lecture 65

  Рет қаралды 40,885

TAP ACADEMY

TAP ACADEMY

Жыл бұрын

We are going to solve a Leetcode problem number 26 in which you have to write a program to remove duplicates from a sorted array.
So for a given sorted array like 2,3,3,4,4,6,6 you have to remove the duplicate elements and return the array in the form 2,3,4,6.
Now there is a simple brute-force approach to this program where you can use two variables and check linearly the duplicates.
But as a student of coding who is learning DSA, you must always look for an optimal solution that consumes the least time.
Let's see how we can more efficiently solve this program of removing duplicates from an array.
For more information, fill out this form: forms.gle/8eiUmM92Fx563Aen9
or call us at 8884881203
Facebook: / thetapacademy
Instagram: / tapacademy_online
Linkedin: / 73820805
Website: www.thetapacademy.com​
#java #array #programming #arrayjava #dsa #dsaplaylist #dsacourse #programmer #job #placementtraining

Пікірлер: 63
@Ratan_tata_jii
@Ratan_tata_jii 9 ай бұрын
I HAVE NEVER SEEN ANYONE EXPLAIN LIKE THIS.❤
@abdihaashin1350
@abdihaashin1350 6 ай бұрын
this is man is the best teacher. i never see before. my God bless you and your family aamiin
@ManishJaiswal-sh3jm
@ManishJaiswal-sh3jm 5 күн бұрын
I have never come across such wonderful explanation video. Thankyou so much bro for the video 😊.
@ahsankazi9837
@ahsankazi9837 Ай бұрын
Brother thank you so much for taking your time to explain the logic , lots of you-tubers rush through to make their video short . Please upload more videos like this and explain it slowly. Thanks again, and GOD BLESS
@shubhammanecr7
@shubhammanecr7 4 ай бұрын
Solution without temporary array is amazing!
@newminds8619
@newminds8619 9 ай бұрын
Beautifully explained sir👍
@ankithareddy4497
@ankithareddy4497 9 ай бұрын
Just amazing explanation ❤ thanks alot
@zainabalayande278
@zainabalayande278 Жыл бұрын
I rarely comment on youtube videos, but I must say this video is superb and well explained. You made it really simple, most especially when you mentioned you needed two persons to go through the array...............thank you
@SoniYadav-pe9hn
@SoniYadav-pe9hn 3 ай бұрын
your explanation is too good😍😍😍
@bokinalavijay6876
@bokinalavijay6876 6 ай бұрын
Excellant teaching sir thank you❤
@prasadnakade8267
@prasadnakade8267 7 ай бұрын
Best Explaination Thank You Sir
@Manishkumar-qy7zf
@Manishkumar-qy7zf 7 күн бұрын
Awesome explanation.
@naidulipsa
@naidulipsa Ай бұрын
no one is explain like this thank you so much sir
@shanmukhasridharreddypittu229
@shanmukhasridharreddypittu229 10 ай бұрын
Thank you bro you explanation is super
@MohammedSameer-rx5rz
@MohammedSameer-rx5rz 10 ай бұрын
Simply Awesome brother ---- My suggestion is Could you please teach with Real-life Examples taking Eggs, or any items to Explain Clearly for Better Understanding to students ... Thank you for your Teaching Style
@jatin9987
@jatin9987 3 ай бұрын
isme kya real life example chahiye bey
@saarza9991
@saarza9991 2 ай бұрын
​@@jatin9987 usko boiled egg pasand honge bhai don't judge
@srin42
@srin42 Жыл бұрын
Very nice explanation: This whole world of teaching is sucks.. and f ks.. naming variables with i and j 's but your naming variable's in meaningful manner which really helps alot for junior to senior. I bow you . Please keep doing many more. I will share my friends what's groups
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Thanks for the appreciation.
@DeepakKumar-oz5ky
@DeepakKumar-oz5ky 8 ай бұрын
thanks bhaiya for super explanation
@astrophysics886
@astrophysics886 3 ай бұрын
nice explanation sir
@user-ei3ng5kt4n
@user-ei3ng5kt4n 8 күн бұрын
Thank you brother
@PavanKumar-bv6jr
@PavanKumar-bv6jr 4 ай бұрын
nice one bro
@ramchandrajadhav5648
@ramchandrajadhav5648 4 ай бұрын
Beutiful explaination
@sulagnasarkar7332
@sulagnasarkar7332 10 ай бұрын
Amazing
@posachowdamma7710
@posachowdamma7710 9 ай бұрын
sir super explantion
@prajwalm.s7976
@prajwalm.s7976 7 ай бұрын
Visualisation always helps
@AestheticWorld_04
@AestheticWorld_04 21 күн бұрын
Sir please tell me where you mention, that first element will be same as of previous array's first element in main code. Please tell me 😢
@user-bl9ph5eg7z
@user-bl9ph5eg7z 3 ай бұрын
sir please upload more videos of dsa topics
@BOSS55
@BOSS55 9 ай бұрын
beautiful masterful glorious
@guessme424
@guessme424 3 ай бұрын
amazing mannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
@user-mg1my1zg7p
@user-mg1my1zg7p 5 ай бұрын
Sir can we also provide Python code at the same time....concepts are clear but understaing the Java is bit difficult
@ryanafzal4129
@ryanafzal4129 7 ай бұрын
What is time complexity of this algorithm?
@user-bl9ph5eg7z
@user-bl9ph5eg7z 3 ай бұрын
please sir upload more topics
@pragmaticcoder6910
@pragmaticcoder6910 4 ай бұрын
LeetCode must put your solutions in their Editorial section. Credit must be given to you.
@ashutosh_code
@ashutosh_code Ай бұрын
sir 169ms runtime, is it good or bad ?
@nethminafernando3749
@nethminafernando3749 7 ай бұрын
@aneesahassan8512
@aneesahassan8512 3 ай бұрын
What is it time complexity?
@rutujasangole7593
@rutujasangole7593 8 ай бұрын
Rd Index 3 means
@princenagar1686
@princenagar1686 6 ай бұрын
Sir this code is not submitting on leetcode, even when the Logic is 100% Correct and working Perfectly in VS Code
@abhijithsuresh5334
@abhijithsuresh5334 Жыл бұрын
Sir question about Array Rotation
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Coming up with this lecture today. Stay tuned
@dipakbadgujar1238
@dipakbadgujar1238 Жыл бұрын
This will work for unsorted array?? And we can use hashmap for unsorted array
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Do recommend Tap Academy in your community. It will be great if you can share our channel in your whatsapp groups amongst your friends.
@Prashantkumar-hb8kt
@Prashantkumar-hb8kt Жыл бұрын
Personally I am suggesting student sir about u , really ur awesome the way u explain first meeting with u I will always remember re
@HusnaKhanam-bm4fq
@HusnaKhanam-bm4fq 4 ай бұрын
😇
@aleefsultan176
@aleefsultan176 Ай бұрын
what about 234324?
@babitakumari-ln1zb
@babitakumari-ln1zb 6 ай бұрын
Edge cases not covered
@codingcure788
@codingcure788 6 ай бұрын
This is not feasible solution. Remove duplicates from array means it shouldn't be there. But still it is available inside array
@khanra17
@khanra17 4 ай бұрын
It is the most optimal solution. It's inplace just slice till what you need.
@codingcure788
@codingcure788 4 ай бұрын
@@khanra17 brother suppose I will tell remove water from glass. Then what u will do ? U will empty the glass or still u will keep water ? U should remove all the water correct. Similarly here remove elements from array means the elements should remove permanently from array.
@_sarthakmisal
@_sarthakmisal 4 ай бұрын
Cut the glass of required length lol ​@@codingcure788
@SuvoBiswas-eh9sp
@SuvoBiswas-eh9sp 3 ай бұрын
Yes there are some problems in that method
@SuvoBiswas-eh9sp
@SuvoBiswas-eh9sp 3 ай бұрын
public class Spiral { static void removeDuplicate(int[] arr){ int rd=0; for(int i=0; i
@Timeless_Trader
@Timeless_Trader 11 ай бұрын
I am not getting correct output in case of below code: If anyone can help? What's wrong with this code? public class remDuplicates { static int removeDuplicate(int[] arr) { int rd = 0; for(int i=1; i
@mdnouman5396
@mdnouman5396 10 ай бұрын
bro this solution is only for sorted array you cant give input in unsorted order
@mdnouman5396
@mdnouman5396 10 ай бұрын
you can first sort the array and then send it to the function like these int[] arr = { -15, 1, 2, 3, 4, 5, 0, 3, 3, 1, 4 }; System.out.println(Arrays.toString(arr)); Arrays.sort(arr); // sorting int rd = removeDuplicate(arr); for(int i=0; i
@Timeless_Trader
@Timeless_Trader 10 ай бұрын
@@mdnouman5396 Thank you for your help.
@codingcure788
@codingcure788 6 ай бұрын
Bro even you sorted the array. The output is will not come properly. Because remove elements mean it shouldn't be there.
@Ashleysarash
@Ashleysarash Жыл бұрын
u look like kl rahul
@user-gd3zj1cz8p
@user-gd3zj1cz8p 3 ай бұрын
Real it's too good to understand 🫡
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 90 МЛН
How To Choose Ramen Date Night 🍜
00:58
Jojo Sim
Рет қаралды 61 МЛН
Remove Duplicates from Sorted Array II | Leetcode 80 | Array
11:29
Ayushi Sharma
Рет қаралды 32 М.
Leetcode 26 - Remove Duplicates from Sorted Array JavaScript
7:15
Remove Duplicates from sorted Array
21:22
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 164 М.
LeetCode in Java | Easy Question | Remove Duplicates from Sorted Array
14:49
Remove Duplicate Elements from Unsorted Array - Java Code
13:50
Programming Tutorials
Рет қаралды 99 М.
Solve Any Pattern Question With This Trick!
57:20
Kunal Kushwaha
Рет қаралды 2,2 МЛН
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 90 МЛН