884. Uncommon Words from Two Sentences || In JAVA || Leetcode Problem || Easy

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

Quick Learning With Sree

Quick Learning With Sree

Күн бұрын

Пікірлер: 9
@quicklearninigwithsree
@quicklearninigwithsree Жыл бұрын
Code:- class Solution { public String[] uncommonFromSentences(String s1, String s2) { String[] str1 = s1.split(" "); String[] str2 = s2.split(" "); HashMap hm = new HashMap(); for(String s : str1){ hm.put(s,hm.getOrDefault(s,0)+1); } for(String s : str2){ hm.put(s,hm.getOrDefault(s,0)+1); } int count=0; for(Map.Entry e : hm.entrySet()){ if(e.getValue() == 1){ count++; } } String[] arr = new String[count]; int k=0; for(Map.Entry e : hm.entrySet()){ if(e.getValue() == 1){ arr[k]=e.getKey(); k++; } } return arr; } }
@YATINDRATiwari-m3n
@YATINDRATiwari-m3n Ай бұрын
before watching this video i dont know how to use hashmap but the way u explain it , i know this question as well i know how to use hashmap too. thank you 💌, and yes ur voice is so sweet 🤌
@quicklearninigwithsree
@quicklearninigwithsree Ай бұрын
My pleasure 😁
@hackerIfeelYou
@hackerIfeelYou 9 ай бұрын
your voice is so sweet yrr and nice explanation
@SitaRam-js9fu
@SitaRam-js9fu Ай бұрын
Nice complexity analysis...i have a suggestion...Ma'am u can use pen to visualize hasmap stored data in example
@quicklearninigwithsree
@quicklearninigwithsree Ай бұрын
Noted.
@madhusudhanssudhan8046
@madhusudhanssudhan8046 Ай бұрын
10/10 teaching😍
@harsha9808
@harsha9808 Ай бұрын
nice explanation mam ,but the volume of voice should be a little bit high with clarity.
@quicklearninigwithsree
@quicklearninigwithsree Ай бұрын
@@harsha9808 thank you for your feedback will work on that 😄
448. Find All Numbers Disappeared in an Array||In Java || Easy Way #leetcode
11:00
Uncommon Words from Two Sentences - Leetcode 884 - Python
5:30
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 1,1 МЛН
My MEAN sister annoys me! 😡 Use this gadget #hack
00:24
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 67 МЛН
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 542 М.
Checked vs. Unchecked Exceptions in Java Tutorial - What's The Difference?
10:14
Improve Your  Speaking Skills in English  \ Session 4
24:48
English Fluency Journey
Рет қаралды 26 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,8 МЛН
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 604 М.
One CPU To Rule Them All - Ryzen 7 9800X3D Review
12:47
Linus Tech Tips
Рет қаралды 1,1 МЛН
LeetCode Question with Solution | Two Sum Problem | Placement Series
15:35
Jenny's Lectures CS IT
Рет қаралды 12 М.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Amigoscode
Рет қаралды 211 М.
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 1,1 МЛН