Divide Players Into Teams of Equal Skill | Leetcode 2491

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

Techdose

Techdose

Күн бұрын

This video explains how to divide players into teams of equal skill using greedy sorting approach and hashmap optimal approach.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
🟣 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
🔵 LinkedIn: / surya-pratap-kahar
🔴 INSTAGRAM: / techdose_official
🟢 𝐓𝐞𝐜𝐡𝐝𝐨𝐬𝐞-𝟏𝟎𝟎 𝐬𝐡𝐞𝐞𝐭: docs.google.co...
---------------------------------------------------------------------------------------------------------------------------------------------------------------
𝐂𝐎𝐃𝐄 𝐋𝐈𝐍𝐊: gist.github.co...

Пікірлер: 9
@Grishma_Gedela
@Grishma_Gedela 5 күн бұрын
Explained very clearly.... please continue
@techdose4u
@techdose4u 5 күн бұрын
sure
@hardikkumar6575
@hardikkumar6575 5 күн бұрын
Or you can just sort the array and run a 2 pointer from beginning and end and checking if the sum is equal to the sum of first and last element (or any other pair such that the elements corresponds from beginning and end) and whenever it is not true the answer won't exist, so just return -1. At first I thought it was too easy and ran the code and it got accepted 😂
@techdose4u
@techdose4u 5 күн бұрын
Nice
@sailendrachettri8521
@sailendrachettri8521 6 күн бұрын
Oct Day 4 complected :)
@techdose4u
@techdose4u 5 күн бұрын
Nice
@gargsharadkumar
@gargsharadkumar 5 күн бұрын
Equal sum subsets
@techdose4u
@techdose4u 5 күн бұрын
not exactly :)
@gargsharadkumar
@gargsharadkumar 5 күн бұрын
@@techdose4u agree with you sir. It is an intuition and can be used to solve this problem.
All O`one Data Structure
25:04
Techdose
Рет қаралды 944
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 114 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 13 МЛН
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 77 МЛН
K-th Smallest in Lexicographical Order
20:29
Techdose
Рет қаралды 980
Not a subset sum | GfG Problem of the Day | Arrays
7:59
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,6 МЛН
Make Sum Divisible by P | Leetcode 1590
22:55
Techdose
Рет қаралды 2 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 425 М.
Rank Transform of an Array | Leetcode 1331
9:05
Techdose
Рет қаралды 2,2 М.
Why 99.6% of Indians Aren't Rich
18:22
Mohak Mangal
Рет қаралды 1,5 МЛН
Sum of Prefix Scores of Strings
19:00
Techdose
Рет қаралды 932
My Calendar I | Leetcode 729
17:14
Techdose
Рет қаралды 1,6 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 13 МЛН