Equal Row and Column Pairs | Leetcode-2352 | Google, Microsoft | Explanation ➕ Live Coding
Hi everyone, this is the 5th video of our Hash Map/Set Playlist.
In this video we will try to solve a Medium but quite easy and good Qn “Equal Row and Column Pairs”.
We will write very easy and clean code.
We will do live coding after explanation and see if we are able to pass all the test cases.
Problem Name : Equal Row and Column Pairs
Company Tags : Google, Microsoft
My solutions on Github : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/HashMap/Equal%20Row%20and%20Column%20Pairs.cpp
Leetcode Link : https://leetcode.com/problems/equal-row-and-column-pairs/
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Highlights :
0:00 Introduction
8:22 how to write the order of inner (For loop) to compare the elements of row and column.
8:51 Brute Force [ Time compleixty = O(n^3) ]
9:13 optimal approach using map T.C - O(n^2)
14:27 unordered map search operation (O(1) Avg time complexity)
14:33 unordered_map fail when used with a vector as key
14:44 map search operation (O(log n) time complexity)
15:40 Code
18:32 Java code in comments
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview #interviewtips
#interviewpreparation #interview_ds_algo #hinglish