Find Duplicate Elements from list using Java 8 | Java 8 coding Interview Questions | Code Decode

  Рет қаралды 121,298

Code Decode

Code Decode

Күн бұрын

Пікірлер: 126
@manognajoshik8465
@manognajoshik8465 2 жыл бұрын
And yeah, I could clear all the interviews I faced because of you. What more is needed to say you made my career? Thanks a lotttttttt..As a quote goes, donating money to someone may prove helpful to him at that point of time but helping someone earn will help him for lifetime and this is what you are doing. Many thanks..
@CodeDecode
@CodeDecode 2 жыл бұрын
This comment made my day Manogna. Many congratulations to you for your interviews 👏👏🙂🙂. Well deserved 👏👏👏👏👏👏. Thanks a lot for being with us.
@ArtAndCraftsByNirvi
@ArtAndCraftsByNirvi 2 жыл бұрын
hi
@rushikeshgodase8498
@rushikeshgodase8498 2 жыл бұрын
You were fresher or experienced at the time of interview.
@varunb2453
@varunb2453 2 жыл бұрын
Hi , Thank you very much 😊 because of you I cleared 3 MNC interviews.
@CodeDecode
@CodeDecode 2 жыл бұрын
Well deserved Varun. Many congratulations 🎉🎉🎊🎊🎊👍👍keep shining Man 🎊🎊🎊🎊
@rishabhsharma5690
@rishabhsharma5690 2 жыл бұрын
Which all?
@nicoleta8964
@nicoleta8964 Жыл бұрын
Yesterday I was able to watch another of your incredible videos, but today, it feels like I am witnessing a fragment of the past, when parents were screaming at me because I don't get stuff. I need a calmer version of this.
@CodeDecode
@CodeDecode Жыл бұрын
So sorry if you feel so Man. We apologies for this. We will try to be more calmer and composed. Thanks for pointing it up
@shoebahmadkhan531
@shoebahmadkhan531 2 жыл бұрын
I was checking videos for rest APIs and landed on your video from there this is my 7th or 8th video of yours. Continuously watching as all of the concepts are explained very well with practical and all are very interesting. I did not even get bored. Thank you so much mam for teaching us. Please make a video of a spring boot project from the start.🤍
@CodeDecode
@CodeDecode 2 жыл бұрын
kzbin.info/aero/PLyHJZXNdCXsdXxY8wupiLenux2Yafn1lN
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Shoeb 🙂👍
@rishabhsharma5690
@rishabhsharma5690 2 жыл бұрын
Thanks mate. By watching your videos i was able to clear 2 out of 3 interviews and got offer. ❤️ And respect for you ma'am
@CodeDecode
@CodeDecode 2 жыл бұрын
Many congratulations Rishabh 👏👏👏👏well deserved Man 👏👏👏🎊🎊. Thanks a lot 🙏
@rajatgoyal2812
@rajatgoyal2812 Жыл бұрын
Earlier I was not that clear with the implementation of groupingBy() but this video is a gem, which helped me to understand the usage and implementation. Thanks for creating such wonderful content.
@CodeDecode
@CodeDecode Жыл бұрын
Thanks a ton Rajat 😊👍
@gangadharreddy4606
@gangadharreddy4606 Ай бұрын
mam tussi great ho...... continue grt work .....tq so much and lots of love.
@saraswathig7939
@saraswathig7939 8 ай бұрын
Amazing content. 4 days to go...for the interview. Thank you❤
@CodeDecode
@CodeDecode 7 ай бұрын
All the very best for interview
@rohiniravi104
@rohiniravi104 2 жыл бұрын
Hi, ur videos were really helpful to me in cracking interviews.
@arungpurohit7436
@arungpurohit7436 2 жыл бұрын
This is my first comment and i really appreciate you mam for spending ur time and posting some good content thank you for that
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks for supporting us Arun . Much appreciated. Thanks a lot🙂🙂👍👍
@travelwithgattu
@travelwithgattu 2 жыл бұрын
You are awesome 👍. Cracked 2 interviews only watching your videos 😘😘
@CodeDecode
@CodeDecode 2 жыл бұрын
Awesome Sayali. Well deserved girl. Keep learning keep shining ⭐✨⭐✨⭐✨⭐✨🎊🎊🎉🎉🎉
@sivamurthypala5426
@sivamurthypala5426 2 жыл бұрын
Your explanation is very well.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks
@swapnilmishra697
@swapnilmishra697 2 жыл бұрын
Very well explained ...thanks for covering a problem in different ways
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Swapnil🙂🙂👍👍
@bhuvanakuppusamy6933
@bhuvanakuppusamy6933 2 жыл бұрын
Clearly explained. Thanku so much
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Bhuvana 🙂👍
@ajitpeshane8311
@ajitpeshane8311 10 ай бұрын
Nice Series, on the Interview Questions and I am feeling Self Confident to crack the interviews. Specially the Java 8 programs, I was lacking in that, these videos made my life easy.. Many thanks to Code Decode. Keep creating the content, it is very useful..
@brrachana330
@brrachana330 2 жыл бұрын
Thankyou for all your java related imp questions and answers it is really helping me for interviews☘️
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks ❤
@manojpatil2457
@manojpatil2457 2 жыл бұрын
Liked even without watching ,😁. Your content is awesome...
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks a lot Manoj 🙂👍
@AbhishekSingh-jt9fn
@AbhishekSingh-jt9fn 2 жыл бұрын
You are the best..nice explanation..keep it up.🙂
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks abhishek
@hrajiv29
@hrajiv29 2 жыл бұрын
Excellent coverage on Duplicate elements, Thanks for such a nice explanation.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Rajiv 🙂👍
@tannubajpai4782
@tannubajpai4782 2 жыл бұрын
u ar awsm ma'am
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Tannu🙂🙂
@sharish1818
@sharish1818 2 жыл бұрын
Thank so much for helping us
@CodeDecode
@CodeDecode 2 жыл бұрын
Always there Harish 🙂🙂👍👍
@abhinavmishra9690
@abhinavmishra9690 2 жыл бұрын
Very nicely explained and covered three to four concepts. Thanks 🙂
@CodeDecode
@CodeDecode 2 жыл бұрын
🙂🙂👍👍
@manognajoshik8465
@manognajoshik8465 2 жыл бұрын
Mam, I have gone through your Microservices videos too. Not sure if I missed something but I need Resilience4j features including bulkhead. Very much addicted to your videos. Now it feels like I can understand things from no other resource but yours. Please make a video on entire Resilience4j.
@CodeDecode
@CodeDecode 2 жыл бұрын
Nice topic Manogna sure we will create videos on microservice design pattern 🙂👏
@rajashekar-bu8xd
@rajashekar-bu8xd 2 жыл бұрын
Good one, keep making videos like this..
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Shekar 👍
@lifeofme3172
@lifeofme3172 Жыл бұрын
@CodeDecode in line 71, we dont need filter function, just adding into set will remove duplicates. But anyways i learn and enjoy your videos thanks
@santosh0513
@santosh0513 2 жыл бұрын
Thank you 😊
@CodeDecode
@CodeDecode 2 жыл бұрын
You're welcome
@sayanbiswas8847
@sayanbiswas8847 2 жыл бұрын
Very helpful. Thanks for this.
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Sayan 🙂🙂
@paridadeepika
@paridadeepika Жыл бұрын
explained very nicely.keep posted..
@CodeDecode
@CodeDecode Жыл бұрын
Thanks 😊
@jhari4683
@jhari4683 Жыл бұрын
Thanks 😃
@CodeDecode
@CodeDecode Жыл бұрын
You're welcome
@polanadinesh3590
@polanadinesh3590 Жыл бұрын
I have a question in(video 5:41) Unique and duplicate names. I obesrved unique names output. It was wrong because "code" is repeated unique names output and duplicate names output. I want a solution for this. I faced difficulty in an interview. If possible please answer ASAP.
@pallemmani6726
@pallemmani6726 Жыл бұрын
I had same question.
@ahishnar1568
@ahishnar1568 2 жыл бұрын
Great work ❤️🙏
@CodeDecode
@CodeDecode 2 жыл бұрын
Thanks Ahish 🙂👍
@theprofessor252
@theprofessor252 Жыл бұрын
Brilliant!
@CodeDecode
@CodeDecode Жыл бұрын
Thanks
@shraddhawagh9480
@shraddhawagh9480 2 жыл бұрын
Hi Mam ..I am big fan of yours the way you explained is really awesome . When I watch your videos and then go for interview interviews it really really impress the panel which were sitting in front me. One suggestion mam the slide which you were explaining can you add it in comment section so that I can refer that slide at the time of interview at the end moment like notes. And also mam please make project on Springboot, angular, mysql or oracle DB if possible microservice also add whole concept in one project. It will really helpful for us.. Thank you so much Mam
@CodeDecode
@CodeDecode 2 жыл бұрын
Awesome Shraddha. Many congratulations on successfully clearing interviews. Yeah we are planning to give ppt In a way that wont harm us and help you too. Currently we will face copyright issues if shared directly that's why we are trying ways
@shraddhawagh9480
@shraddhawagh9480 2 жыл бұрын
@@CodeDecode also mam please make project on Springboot, angular, mysql or oracle DB if possible microservice also add whole concept in one project. It will really helpful for us..
@CodeDecode
@CodeDecode 2 жыл бұрын
Nice suggestion Shraddha. Sure we will do that 🙂🙂👍👍
@islamiyazindagi6178
@islamiyazindagi6178 2 жыл бұрын
Very well explained mam.. Could u plz help me to get 2nd part of this video ...
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure 👍👍
@adarshverma3372
@adarshverma3372 Жыл бұрын
Too good
@CodeDecode
@CodeDecode Жыл бұрын
Thanks Adarsh 😇👍👍
@yoshitamahajan353
@yoshitamahajan353 7 ай бұрын
Can u plz make video on implementation explanation of hld with example plz...as its askd in interview
@varunb2453
@varunb2453 2 жыл бұрын
Hi , One of the interview question as shown below: Suppose we have List => (id,name,salary,city). Now we need to get the unique list based on Name or salary etc, pls let us know the different ways to achieve it. Thank you.
@rushikeshgodase8498
@rushikeshgodase8498 2 жыл бұрын
i dont understand the question. Name or/and salary?
@ionadsouza1066
@ionadsouza1066 2 жыл бұрын
Use comparator interface and sort it based on salary or name
@vivekpisal2857
@vivekpisal2857 Жыл бұрын
3 Approach 1. Using add() method of Set to verify the element is already present or not. 2. Using groupingBy() method. 3. Using frequency() method of Collections class.
@CodeDecode
@CodeDecode Жыл бұрын
👍👍❤️
@shubhamkhandelwal7220
@shubhamkhandelwal7220 2 жыл бұрын
Because of you I am getting offer letters 😅
@CodeDecode
@CodeDecode 2 жыл бұрын
It's your hard work that's paying off Shubham. Well done 🎉🎉🎉🎉keep learning keep shining ⭐✨⭐✨⭐✨⭐✨
@shradhasamantaray3062
@shradhasamantaray3062 11 ай бұрын
I love your videos.. How can i know the sequence to read for java8. Can you help me with a link or any way how i can know the videos to start with followed by the next as i dont see numbering
@realnileshpawar
@realnileshpawar 2 жыл бұрын
Mam what is -> operator. Please make a separate video
@CodeDecode
@CodeDecode 2 жыл бұрын
kzbin.info/aero/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy
@apurvabagdiya
@apurvabagdiya 2 жыл бұрын
Hi, Can you please make a tutorial video on basics and how to use streams in Java 8🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@CodeDecode
@CodeDecode 2 жыл бұрын
kzbin.info/aero/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy Here we have all tutorial from basics too 🙂👍👍
@Parni_Stories
@Parni_Stories 2 жыл бұрын
Hi Mam, Can you please cover any one of the Nosql DB? Thanks in advance
@CodeDecode
@CodeDecode 2 жыл бұрын
kzbin.info/www/bejne/eqa8dYh4rsmFgpY Here u go Anuradha. This may help u. 🙂👍
@shaddy543
@shaddy543 Жыл бұрын
Buddy, Can you please explain how Function.identity() is taking the name as its key.?
@b.vishnuvardhan3704
@b.vishnuvardhan3704 Жыл бұрын
in the first approach as you mentioned finding duplicate and unique elements at a time having a issue in the explanation you cant find unique and duplicate element in one go why because lets take an example you are holding two strings "code" and "code" which means those are duplicate while adding first time to the list it will add to unique element and second time it will add to duplicate element list so hence it was duplicate element naa so how can we say it is a unique element also
@chaitutom5789
@chaitutom5789 Жыл бұрын
Could you do one video on only maps in collection
@javier.alvarez764
@javier.alvarez764 2 жыл бұрын
Can you do a video on Event Driven Architecture and also Kafka?
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure we will create video on that soon 🙂👍
@FBHI
@FBHI 8 ай бұрын
Before giving all this, say that ypu can just add the List, into the SetList constructor method, Java will convert into Set automatically and discard all the duplicates, but if your interviewer wants a stream solution, you can show the ones from this video.
@swapnareddy4938
@swapnareddy4938 2 жыл бұрын
Hi We have two lists l1 n l2 with some integers. How to print unique elements by comparing two lists.could please tell
@amarthyaseshu683
@amarthyaseshu683 2 жыл бұрын
U can add those 2 list elements in 1 list & convert to set I think
@chandugaddam4985
@chandugaddam4985 2 жыл бұрын
List list1 = new ArrayList(Arrays.asList(1, 2, 3, 4, 5, 4, 3)); List list2 = new ArrayList(Arrays.asList(1, 3, 4, 6, 10)); Set uniqueElements = new HashSet(list1); uniqueElements.addAll(list2); uniqueElements.forEach(System.out::println); Hope it helps
@swapnareddy4938
@swapnareddy4938 2 жыл бұрын
@@chandugaddam4985 using stream and lamda
@swapnareddy4938
@swapnareddy4938 2 жыл бұрын
@@amarthyaseshu683 using streams and lambda
@chandugaddam4985
@chandugaddam4985 2 жыл бұрын
@@swapnareddy4938 List list1 = new ArrayList(Arrays.asList(1, 2, 3, 4, 5, 4, 3)); List list2 = new ArrayList(Arrays.asList(1, 3, 4, 6, 10)); List uniqueElements = Stream.concat(list1.stream(),list2.stream()).distinct().collect(Collectors.toList()); uniqueElements.forEach(System.out::println); Hope it helps :)
@karishmarawat1359
@karishmarawat1359 2 жыл бұрын
Awesome content as always! Please keep on creating more coding questions using java 8. Also, Can you please upload playlist on Dropwizard java framework as well just like you did for spring boot. Truly appreciate your efforts :)
@CodeDecode
@CodeDecode 2 жыл бұрын
Sure Karishma thanks 🙂🙂👍👍
@mit1696
@mit1696 2 жыл бұрын
I want a super like button for this channel 😀
@CodeDecode
@CodeDecode 2 жыл бұрын
Haha. Thanks a ton for supporting us 🙂👍
@alok7485
@alok7485 2 жыл бұрын
//Please explain how to Write Java 8 program to return word as a list value and its length as a key in descending sorting order from below sentence, -Input => String statement = "Hello World My name is Jane and I hate Mango Fruit"; Output=> {5 = [“Hello”, “World”, “Mango”, “Fruit”], 4 = [“name”, “Jane”, “hate”], 3 = [“and”], 2 = [“My”, “is”], 1 = [“I”]}
@CodeDecode
@CodeDecode 2 жыл бұрын
Pseudo code : Split string by space, create list from array of string. Open stream on list Group by string's length n values will become list of all strings of that length👍
@sivalokesh3997
@sivalokesh3997 11 ай бұрын
String str="Hello Hi Hower yu"; String[]s= str.split(" "); Maphm=Arrays.stream(s).collect(Collectors.groupingBy(String::length,TreeMap::new,Collectors.toList())); hm.forEach( (k,v)->{ System.out.println(k); System.out.println(v); } );
@kshitijsingh1990
@kshitijsingh1990 3 ай бұрын
String statement = "Hello World My name is Jane and I hate Mango Fruit"; String[] str = statement.split(" "); TreeMap ansMap = Arrays.stream(str). collect(Collectors.groupingBy(String::length, () -> new TreeMap(Comparator.reverseOrder()), Collectors.toList())); System.out.println(ansMap);
@testing12521
@testing12521 10 ай бұрын
First example explanation was too confusing maam ❤
@naadhsharyticha
@naadhsharyticha 2 жыл бұрын
Very well explained..thank you so much ma'am But, In First way, as you said we can get unique elements too.. but it's not the case as for first time when "code" comes it will get added to uniqueNames set and second time it restricts..so we need to add further logic for unique elements
@kolleparaakarsh5415
@kolleparaakarsh5415 2 жыл бұрын
Pass the list in set constructor. it filters. Automatically and gives unique values. Or collectors.toset also works.
@TheFebruary10
@TheFebruary10 2 жыл бұрын
How do you compare data from an excel sheet with db data
@CodeDecode
@CodeDecode 2 жыл бұрын
Convert excel sheet data to java Dto Or pojo. Then u can easily compare it with db entity. 🙂👍
@richyou8206
@richyou8206 2 жыл бұрын
Hi, can you pls share this spring boot crud project github or video link please
@CodeDecode
@CodeDecode 2 жыл бұрын
Ohh actually we removed the code while giving demo. Will try to push code to git.
@richyou8206
@richyou8206 2 жыл бұрын
@@CodeDecode thanks 🙏
@shubhamkhune3132
@shubhamkhune3132 2 жыл бұрын
Hii kshitija mam😍
@CodeDecode
@CodeDecode 2 жыл бұрын
Sorry for disappointment Shubham, but who is Kshitija?
@shubhamkhune3132
@shubhamkhune3132 2 жыл бұрын
@@CodeDecode what is your name
@shubhamkhune3132
@shubhamkhune3132 2 жыл бұрын
@@CodeDecode your name is kshitija.😍
@CodeDecode
@CodeDecode 2 жыл бұрын
Again sorry for disappointment Shubham. It's not true. And we can't reveal us bcz we all are working IT professionals. Our jobs will come to stake if we did that. But yes can say, none of us is Kshitija here in our team code decode.
@shubhamkhune3132
@shubhamkhune3132 2 жыл бұрын
@@CodeDecode ,😍
@taniyadas4461
@taniyadas4461 7 ай бұрын
Videos are very informative but the voice could be a bit calmer, it feels like someone is screaming in my ears !!!😅
@shibanikumari8291
@shibanikumari8291 Жыл бұрын
Can you plz share the github link
@AmmarAlBalawi-o1b
@AmmarAlBalawi-o1b 29 күн бұрын
annoying
@CodeDecode
@CodeDecode 29 күн бұрын
Apologies 🙏 ammar al balawi
@venkatramanab7387
@venkatramanab7387 2 жыл бұрын
System.out.println(nameList.stream().collect(Collectors.groupingBy(String::new, Collectors.counting())));
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
28. Streams in Java8 | Collections in Java - Part7
1:15:10
Concept && Coding - by Shrayansh
Рет қаралды 66 М.
Java 8 groupingBy | groupingBy In Streams |Java Shastra
24:28
Java Shastra
Рет қаралды 31 М.
TOP 20 JAVA 8 Interview Questions & Answers | Ashok IT
15:23
Ashok IT
Рет қаралды 37 М.
Java 8 Streams 🔥  | 10 IMPORTANT Coding Questions & Answers | Streams API
28:15
Code With Ease - By Varsha
Рет қаралды 23 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН