No video

1380 Lucky Numbers in a Matrix | Zero to FAANG Kunal | Assignment Solution | Leetcode

  Рет қаралды 7,080

Programmers Zone

Programmers Zone

Күн бұрын

1380 Lucky Numbers in a Matrix | Zero to FAANG Kunal | Assignment Solution | Leetcode
Problem link :
leetcode.com/p...
Course link:
github.com/kun...
Complete Java + DSA + Interview Preparation + CP Course
• Java + DSA + Interview...
Hi, thanks for watching our video about 2D Arrays in Java
In this video we’ll walk you through:
- Brute Force
- Efficient approach
- Solution Code
TIMESTAMPS
Intro
Explanation begins
IDE solution
ABOUT OUR CHANNEL
Our channel is all about Programming. We cover lots of cool stuff such as solution to problems, concept explanation and tricks to master CP
Check out our channel here:
/ @programmerszone
Don’t forget to subscribe!
CHECK OUT OUR OTHER Playlists
GeeksforGeeks playlist:
• GeeksforGeeks problems
Complete C++ Course playlist:
• Complete C++ playlist
CodeChef Playlist:
• CodeChef Problems
HackerRank playlist:
• HackeRank problems
LeetCode problems
• Leetcode problems Solu...
FIND US AT
www.waadanibha...
GET IN TOUCH
Contact us on hopesalivenow@gmail.com
1380. Lucky Numbers in a Matrix
Easy
624
53
Add to List
Share
Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order.
A lucky number is an element of the matrix such that it is the minimum element in its row and maximum in its column.
Example 1:
Input: matrix = [[3,7,8],[9,11,13],[15,16,17]]
Output: [15]
Explanation: 15 is the only lucky number since it is the minimum in its row and the maximum in its column
Example 2:
Input: matrix = [[1,10,4,2],[9,3,8,7],[15,16,17,12]]
Output: [12]
Explanation: 12 is the only lucky number since it is the minimum in its row and the maximum in its column.
Example 3:
Input: matrix = [[7,8],[1,2]]
Output: [7]
Constraints:
m == mat.length
n == mat[i].length
1 = n, m = 50
1 = matrix[i][j] = 10^5.
All elements in the matrix are distinct.
Accepted
51,317
Submissions
72,853
#codechef #coding #python #hackerrank #programming #java #computerscience #coder #code #competitiveprogramming #machinelearning #pythonprogramming #algorithms #cpp #javascript #hackerearth #webdeveloper #geeksforgeeks #codinglife #leetcode #c #codeforces #engineering #codingmemes #programmer #hacker #programmingmemes #topcoder #webdevelopment #bhfyp #DSAwithKunal

Пікірлер: 20
@rutambhagat4556
@rutambhagat4556 2 жыл бұрын
where is the optimized solution for this question? please share the optimized approach which is faster than 100% of java submissions as well Also please provide 53. Maximum Subarray video link
@ProgrammersZone
@ProgrammersZone 2 жыл бұрын
Faster than X% of java submissions doesn't means that the code is optimised it just tells a number just focus on time comlexity because each time you'll run your code the faster results will vary I hope you understand :)
@angshumanvlogs2613
@angshumanvlogs2613 Жыл бұрын
for the column it is matrix[i].size() right? but here it is the vice versa how???
@parthkedari5366
@parthkedari5366 Ай бұрын
if you found it, please explain.
@satyamgupta6030
@satyamgupta6030 Жыл бұрын
very nice explaination but please tell us both brute force and optimised solution. So that we can build the logical thinking to optimised our brute force solution with an optimised one.. once again thank you for the video.
@ProgrammersZone
@ProgrammersZone Жыл бұрын
Will try thanks for supporting :)
@aj-lan284
@aj-lan284 Жыл бұрын
Bhai yellow/white pe use kro yarr, kucj bhi nhi dikhta
@deepakchaudhary01
@deepakchaudhary01 Жыл бұрын
As a feedback when you write, please keep the handwriting stable, it gets messed up. atleast legible.
@meetabhashiniparida9417
@meetabhashiniparida9417 Жыл бұрын
Thanku sir🙏🏼
@ProgrammersZone
@ProgrammersZone Жыл бұрын
welcome
@richisantra6407
@richisantra6407 2 жыл бұрын
explain the last for loop
@ProgrammersZone
@ProgrammersZone 2 жыл бұрын
Of brute force approach or optimised one?
@richisantra6407
@richisantra6407 2 жыл бұрын
@@ProgrammersZone brute force
@ProgrammersZone
@ProgrammersZone 2 жыл бұрын
Using the 1st inner nested for loop we calculate the minimum value in the row and using the second one we check whether that value is maximum in its column I hope now it is clear else we can schedule a meet
@richisantra6407
@richisantra6407 2 жыл бұрын
@@ProgrammersZone r u available in instagram?
@ProgrammersZone
@ProgrammersZone 2 жыл бұрын
Yepp programmers_zone_official
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 61 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 7 МЛН
Google Coding Interview With A Competitive Programmer
54:17
Clément Mihailescu
Рет қаралды 2,5 МЛН
The Black Box Method: How to Learn Hard Concepts Quickly
14:09
Colin Galen
Рет қаралды 1,1 МЛН
How To Think Like A Programmer
1:00:07
Coding Tech
Рет қаралды 2 МЛН
Google Coding Interview With A Facebook Software Engineer
49:59
Clément Mihailescu
Рет қаралды 934 М.
Set Matrix Zeros | Leetcode | C++ | Java | Brute-Better-Optimal
13:54
take U forward
Рет қаралды 316 М.
Winning Facebook (Meta) Hacker Cup Qual Round 2022?
53:55
Neal Wu
Рет қаралды 2,4 МЛН
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 61 МЛН