Kth Smallest element in a matrix | Leetcode

  Рет қаралды 6,157

Techdose

Techdose

Күн бұрын

🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
🟣 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
This video explains how to find the kth smallest element in a matrix. We have discussed multiple techniques for solving this problem starting from bruteforce to heap and ending with the most optimal binary search technique.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟢 𝐓𝐞𝐜𝐡𝐝𝐨𝐬𝐞-𝟏𝟎𝟎 𝐬𝐡𝐞𝐞𝐭: docs.google.co...
🟢 TELEGRAM channel ( 𝐏𝐃𝐅 𝐨𝐟 𝐯𝐢𝐝𝐞𝐨): t.me/codewithTECHDOSE
🔵 LinkedIn: / surya-pratap-kahar-47b...
🔴INSTAGRAM: / surya.pratap.k
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Sliding Window Maximum: • Sliding Window Maximum...
𝐂𝐎𝐃𝐄 𝐋𝐈𝐍𝐊: gist.github.co...

Пікірлер: 11
@AkashGupta-sh1pd
@AkashGupta-sh1pd 5 ай бұрын
A very important point to mention here is that mid element may or may not exists the the matrix But since with keep high = mid (even for the case count_smaller == k), we sort of tend to converge to the lowest element in the matrix where count_smaller == k. Hope this helps, if not I will post link to the solution where I have written print stmt to have full clarity
@akulajyoshnavi
@akulajyoshnavi 4 ай бұрын
thanks..!!
@hymnish_you
@hymnish_you 15 күн бұрын
Thanks Bhaiya, Awesome explanation as usual.
@techdose4u
@techdose4u 7 күн бұрын
Always welcome
@debapriyachandra1767
@debapriyachandra1767 7 ай бұрын
We can optimise the count function! Using 2 pointers! You can look into the discussion section
@nandanimadhukar
@nandanimadhukar 2 ай бұрын
very good explanation and technique
@techdose4u
@techdose4u 2 ай бұрын
Thanks
@RishinderRana
@RishinderRana 5 ай бұрын
The best video for this problem so far
@techdose4u
@techdose4u 2 ай бұрын
Thanks
@prasadm3614
@prasadm3614 7 ай бұрын
Loved it !
@techdose4u
@techdose4u 2 ай бұрын
Thanks
Leetcode 378. Kth Smallest Element in a Sorted Matrix [Java]
10:59
if else statement
Рет қаралды 7 М.
Spiral Traversal of a Matrix | Spiral Matrix
16:33
take U forward
Рет қаралды 216 М.
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 131 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 101 МЛН
Search A 2D Sorted Matrix - Fundamentals of Search Space Reduction
29:31
Back To Back SWE
Рет қаралды 51 М.
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Codebagel
Рет қаралды 235 М.
BS-26. Find Peak Element-II | Binary Search
20:02
take U forward
Рет қаралды 79 М.
Remove K digits | Build lowest number | Leetcode #402
15:30
Techdose
Рет қаралды 89 М.
Shortest Path in a Binary Matrix - Leetcode 1091 - Python
12:34
NeetCodeIO
Рет қаралды 23 М.
BS-25. Search in a 2D Matrix - II  |  Binary Search on 2D
15:29
take U forward
Рет қаралды 73 М.
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 131 МЛН