Тёмный

Smallest Range Covering Elements from K Lists | Leetcode 632 

Techdose
Подписаться 177 тыс.
Просмотров 1,9 тыс.
50% 1

This video explains Smallest Range Covering Elements from K Lists
problem from leetcode 632. We will solve this using the optimal sliding window and minheap approach.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
🟣 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
🔵 LinkedIn: / surya-pratap-kahar
🔴 INSTAGRAM: / techdose_official
🟢 𝐓𝐞𝐜𝐡𝐝𝐨𝐬𝐞-𝟏𝟎𝟎 𝐬𝐡𝐞𝐞𝐭: docs.google.co...
---------------------------------------------------------------------------------------------------------------------------------------------------------------
𝐂𝐎𝐃𝐄 𝐋𝐈𝐍𝐊: gist.github.co...

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@rismanrj3259
@rismanrj3259 4 дня назад
Your explanation is really awesome hats off
@techdose4u
@techdose4u 4 дня назад
Thanks
@preetambal7443
@preetambal7443 4 дня назад
Very well Explained. Liked the approach with which you solved❤
@techdose4u
@techdose4u 3 дня назад
Great :)
@FSckaff
@FSckaff 2 дня назад
Good explanation
@techdose4u
@techdose4u 2 дня назад
thanks
@kaziabrarfaiyaz9428
@kaziabrarfaiyaz9428 3 дня назад
Why did you pick min_L=0 where -10^5
@techdose4u
@techdose4u 3 дня назад
because the range INT_MAX - 0 will still be around 2*10^9. Much larger than given range of input. Remember that the min_L is start point of answer range and max_R is the endpoint
@himanshudewan7238
@himanshudewan7238 4 дня назад
Combined array : [0,4,5,8,9....] But we checked [4,5,9] instead of [4,5,8] as in sliding window ? Wont we miss on potential range
@techdose4u
@techdose4u 4 дня назад
the 1D array was an idea. 2D array shouldnt be combined to make 1D else the constraint of 1 per list cant be maintained :)
@hello-world556
@hello-world556 4 дня назад
i dont know its happening to me or some others .Iam loosing hope that may be iam the only one who is not getting these intuitions and not solving the problem by my own😔😔.
@mrmani1700
@mrmani1700 4 дня назад
✋🏻me also 😢
@hello-world556
@hello-world556 4 дня назад
@@mrmani1700 how many problems u solved?
@techdose4u
@techdose4u 4 дня назад
it is common to happen. you need to see a lot more problems and types to start getting more confidence. So, keep pushing and keep doing
@gypsygirlkigypsylife
@gypsygirlkigypsylife 4 дня назад
why initialization of max_R and maxVal is different??
@techdose4u
@techdose4u 3 дня назад
max_R for endpoint of minimum range maxVal for endpoint of current window
@gypsygirlkigypsylife
@gypsygirlkigypsylife 3 дня назад
no i mean to say the value INT_MIN and INT_MAX why different ?
@techdose4u
@techdose4u 3 дня назад
@gypsygirlkigypsylife maxVal needs to be maximized hence can be taken INT_MIN. max_R is just for saving the smallest range endpoint. It was defined INT_MAX to make a larger difference than any range possible according to constraint. So, min_R is 0 and diff is 2*10^9. Max possible range will be less than 10^5 I suppose already mentioned in constraint
@gypsygirlkigypsylife
@gypsygirlkigypsylife 3 дня назад
got it thanks
Далее
Maximum Swap | 4 techniques | Leetcode 670
19:05
Outsmarted 😂
00:20
Просмотров 5 млн
Separate Black and White Balls | Leetcode 2938
11:50
Просмотров 1,3 тыс.
3 Types of Algorithms Every Programmer Needs to Know
13:12
Maximum Width Ramp | Leetcode 962
32:34
Просмотров 1,6 тыс.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Просмотров 323 тыс.
Longest Happy String | Leetcode 1405
14:01
Просмотров 2,1 тыс.
Making an Algorithm Faster
30:08
Просмотров 121 тыс.
Outsmarted 😂
00:20
Просмотров 5 млн