Leetcode 1996 The Number of Weak Characters in the Game | Greedy Arrays | Coding Decoded SDE Sheet

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

Coding Decoded

Coding Decoded

Жыл бұрын

Here is the solution to "The Number of Weak Characters in the Game" leetcode question. Hope you have a great time going through it.
🎉Question: leetcode.com/problems/the-num...
🔴 Connect with me here:
🔅My Linkedin(Sunchit Dudeja): bit.ly/3Qnk0L0
🔅Don't click: bit.ly/32XIXbU
🔅Insta: bit.ly/31TV5ur
🔅 Twitter: / sunchitdudeja
🔅Telegram Link for Chrome: telegram.me/codingdecoded
🔅Telegram Link for phone : t.me/codingdecoded
------------------------------------------------------------------------------------------------------------------------------------------------
Success Stories/Placement Diaries: • Playlist
------------------------------------------------------------------------------------------------------------------------------------------------
Master Data Structures and algorithms 🔽🔽🔽🔽
🔴 Coding Decoded SDE revision Sheet: bit.ly/3MG7d4D
🔥 Coding Decoded Binary Search TreeMap revision Sheet: bit.ly/3kUsiMa
🔥 Coding Decoded Trie revision Sheet: bit.ly/392YOJH
🔥 Coding Decoded Graph SDE sheet: bit.ly/3sfp8H4
🔥 Coding Decoded Stacks/Monotonic Stacks sheet: bit.ly/38tm0Ri
🔥 Coding Decoded Bit Manipulation sheet:bit.ly/3LkVNSe
🔥 Coding Decoded Backtracking SDE sheet: bit.ly/3FCzMwQ
🔥 Coding Decoded DP SDE sheet: bit.ly/38HgY3E
🔥 Coding Decoded Heaps SDE Sheet: bit.ly/3GQqBK7
🔥 Coding Decoded Maps/Sets SDE Sheet: bit.ly/3xfBemu
🔥 Coding Decoded Two Pointer SDE Sheet: bit.ly/3trJCwX
👉 Solution
Java➡️github.com/Sunchit/Coding-Dec...
🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings
Feel free to join discord / discord
🔴 Checkout the series:
👉 Leetcode Interview experiences and tips : • Playlist
👉 Leetcode contests: www.youtube.com?list=PLEI-q7w3s9gRwAEYzYkvVTsYHDi2-ffdL
👉 Leetcode System Design: • System Design
👉 Leetcode LinkedList: • Coding Decoded LinkedL...
👉 Leetcode Stack: • Coding Decoded Stack S...
👉 Leetcode Binary Search: • Coding Decoded BinaryS...
👉 Leetcode Tree: • Coding Decoded Tree Se...
👉 Leetcode Dyanmic Programming: • Coding Decoded Dynamic...
👉 Leetcode Hard: • LeetCode Hard Problems
👉 Leetcode Heap: • Coding Decoded Heap Se...
👉 Building Coding Aptitude: • Building Coding Aptitude
👉 Leetcode Map: • Coding Decoded Map Ser...
👉 Leetcode Two Pointer: • Coding Decoded Two Poi...
👉 Leetcode Backtracking: • Leetcode Backtracking ...
👉 Leetcode Graph Traversal: • Coding Decoded Graph T...
👉 Leetcode Trie: • Coding Decoded Trie Se...
👉 Leetcode Union Find: • Coding Decoded Union F...
👉 Leetcode BFS Graph Problems: • Coding Decoded BFS Ser...
👉 Leetcode Matrix Problems: • Coding Decoded Matrix ...
👉 Leetcode Easy: • Leetcode Easy Problems
👉 Leetcode Bit Manipulation: • Coding Decoded Bit Man...
✨ Hashtags ✨
#CodingDecoded #ProductBased #SoftwareEngineering #FAANGM #FAANG #NSIT #NSUT #engineering #internship #college #Freshers #amazon #apple #coding

Пікірлер: 23
@tanson86
@tanson86 Жыл бұрын
"It should be possible to explain the laws of physics to a barmaid - Albert Einstein". Your explanation reminded me of this quote.
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
ROFL..if you see me in real then people say I resemble the main lead of Sherlok Holmes... Definitely would like to meet you in person
@pranavsharma7479
@pranavsharma7479 Жыл бұрын
best explaination by telling why we are sorting the defence in decreasing order
@akhilburada4524
@akhilburada4524 Жыл бұрын
Thank You Sherlock Holmes❤
@herculean6748
@herculean6748 Жыл бұрын
thank you!
@nareshanchara
@nareshanchara Ай бұрын
very nice
@user-og7de8ih4f
@user-og7de8ih4f Жыл бұрын
Everyone keeps on telling sort on increasing order of attack and decreasing order of defense, but only you told why so.. thanks 🔥
@crackthecode1372
@crackthecode1372 Жыл бұрын
Thanks a lot for this solution !!
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
You're welcome!
@himanshubarak3528
@himanshubarak3528 Жыл бұрын
really great explanation. I am subscribing.
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
Awesome, thank you!
@sagarbora7768
@sagarbora7768 Жыл бұрын
flowing with your explanation flow Nice guruji ❤❤❤ I always wish that daily leetcode have only few just few problems thant coding decoded unsolved so that you can put limited time to this .
@siddharthamishra7598
@siddharthamishra7598 Жыл бұрын
Thanks!!!!!!!!!!!!!!!!❤
@krateskim4169
@krateskim4169 Жыл бұрын
nice
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
Thanks
@neerajd002
@neerajd002 Жыл бұрын
Hi Sanchit, I recently came across this channel after watching your video on Senior Software Engineer. This is the first leetcode problem solving video that I am referring and explanation is really good. I like the way you have used another use case for explaining why defence should be sorted in descending order. Thank you for the explanation and the motivation to attempt more such leetcode problems.
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
Thanks Neeraj
@jessanraj9086
@jessanraj9086 Жыл бұрын
Thanks for the solution
@innoirvinge8431
@innoirvinge8431 Жыл бұрын
why do you ignore the attacks?
@AnkitRaj-my9ck
@AnkitRaj-my9ck Жыл бұрын
Hello bhaiya Can you review your videos at these 2 timestamps 1) 7:53 here you're increasing the count by comparing (4,3) w.r.to (4,9) BUT WITH THE SAME LOGIC at 2) 10:53 you're not increasing the count by comparing (2,1) w.r.to (2,2). I hope you're not wrong but please have a look 😃...
@AnkitRaj-my9ck
@AnkitRaj-my9ck Жыл бұрын
Here w.r.to means with respect to😅
@amitranjan7658
@amitranjan7658 Жыл бұрын
Same issue [2 2] [1 2] [1 1] [1 2] this test case can clear the fact that only 2 out of the 4 mentioned sorting will work
@midhuns8198
@midhuns8198 Жыл бұрын
Thanks for the solution
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 71 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 29 МЛН
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Рет қаралды 462 М.
Opensource, Uncensored, Unbothered. - Flux.1 Image Gen
18:59
MattVidPro AI
Рет қаралды 18 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 95 М.
Best Books for Learning Data Structures and Algorithms
14:01
Engineering with Utsav
Рет қаралды 356 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 599 М.
1996. The Number of Weak Characters in the Game
10:55
Tech Adora by Nivedita
Рет қаралды 4,5 М.
Top 7 Algorithms for Coding Interviews Explained SIMPLY
21:22
Codebagel
Рет қаралды 343 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 71 МЛН