Leetcode 2397. Maximum Rows Covered by Columns | Biweekly Contest 86.
Vložit
- čas přidán 3. 09. 2022
- Use coupon ALISHA on any GeeksforGeeks course to get 10% discount:
practice.geeksforgeeks.org/co...
Connect with me on LinkedIn : / alisha-parveen-80579850
Check out our other playlists:
Dynamic Programming:
• Dynamic Programming
Trees:
• Trees
Heaps and Maps:
• Heaps and Maps
Arrays and Maths:
• Arrays and Maths
Bit Manipulation:
• Bit Manipulation
Greedy Algorithms:
• Greedy Algorithms
Sorting and Searching:
• Sorting and Searching
Strings:
• Strings
Linked Lists:
• Linked Lists
Stack and Queues:
• Stacks and Queues
Two Pointers:
• Two pointers
Graphs, BFS, DFS:
• Graphs, DFS, BFS
Backtracking:
• Backtracking
Non- DSA playlists:
Probability:
• Probability
SQL-Basic Join functions:
• SQL - Basic JOIN Funct...
SQL-Basic Aggregate functions:
• SQL-Basic Aggregate Fu...
leetcode.com/contest/biweekly-contest-86/problems/maximum-rows-covered-by-columns/
int maximumRows(vector& mat, int cols) {
int currentCols = 0;
vectorvisited(mat[0].size(),false);
int ans = 0;
pickColumns(mat, cols, 0, currentCols, visited, ans);
return ans;
}
void pickColumns(vector& mat, int cols, int index, int currentCols,
vector&visited, int&ans)
{
if(index == mat[0].size())
{
int count = 0;
for(int i=0;i
awesome coding style. I liked the way you go and declare variables depending on requirements. 👍
Your explanations are awesome
great explanation
Nice explanation 😇
great explanations ,and u were looking great.
problem is beautiful as you are Thank you for the explanation 🙏
fantastic explanation.