Day-24: (Solution)
Process Restricted Friend Requests
Leetcode #2076
Algorithm: Disjoint Set
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/68ab4a613546e86f71d9f4b63c0ceee4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Process Restricted Friend Requests
Leetcode #2076
Algorithm: Disjoint Set
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/68ab4a613546e86f71d9f4b63c0ceee4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Process Restricted Friend Requests - LeetCode
Can you solve this real interview question? Process Restricted Friend Requests - You are given an integer n indicating the number of people in a network. Each person is labeled from 0 to n - 1.
You are also given a 0-indexed 2D integer array restrictionsβ¦
You are also given a 0-indexed 2D integer array restrictionsβ¦
Day-25:
Max Area of Island
Leetcode #2076
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/68ab4a613546e86f71d9f4b63c0ceee4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Max Area of Island
Leetcode #2076
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/68ab4a613546e86f71d9f4b63c0ceee4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Max Area of Island - LeetCode
Can you solve this real interview question? Max Area of Island - You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surroundedβ¦
Day-25: Solution
Max Area of Island
Leetcode #695
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/cd2caf844648a355d82a6b1f9d69efaf
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Max Area of Island
Leetcode #695
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/cd2caf844648a355d82a6b1f9d69efaf
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Max Area of Island - LeetCode
Can you solve this real interview question? Max Area of Island - You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surroundedβ¦
Day-26:
Number of Closed Islands
Leetcode #1254
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Number of Closed Islands
Leetcode #1254
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Number of Closed Islands - LeetCode
Can you solve this real interview question? Number of Closed Islands - Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island totally (all left, top, right, bottom)β¦
Day-26: Solution
Number of Closed Islands
Leetcode #1254
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/4ea26ccb3d6ca3aafe878bd152f5dfa4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Number of Closed Islands
Leetcode #1254
Algorithm: Disjoint Set/ DFS / BFS
Disjoint Set: https://youtu.be/eTaWFhPXPz4
Disjoint Set (Union by Rank & Path Compression): https://youtu.be/kaBX2s3pYO4
Solution CODE: https://gist.github.com/SuryaPratapK/4ea26ccb3d6ca3aafe878bd152f5dfa4
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Number of Closed Islands - LeetCode
Can you solve this real interview question? Number of Closed Islands - Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island totally (all left, top, right, bottom)β¦
Day-27:
Find Eventual Safe States
Leetcode #802
Algorithm: DFS / BFS / Topological Sort
DFS: https://youtu.be/CvUMf8c2JFo
BFS: https://youtu.be/YYq38LTz774
Topological Sort: https://youtu.be/qe_pQCh09yU
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Find Eventual Safe States
Leetcode #802
Algorithm: DFS / BFS / Topological Sort
DFS: https://youtu.be/CvUMf8c2JFo
BFS: https://youtu.be/YYq38LTz774
Topological Sort: https://youtu.be/qe_pQCh09yU
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Find Eventual Safe States - LeetCode
Can you solve this real interview question? Find Eventual Safe States - There is a directed graph of n nodes with each node labeled from 0 to n - 1. The graph is represented by a 0-indexed 2D integer array graph where graph[i] is an integer array of nodesβ¦
Day-27: (Solution)
Find Eventual Safe States
Leetcode #802
Algorithm: DFS / BFS / Topological Sort
DFS: https://youtu.be/CvUMf8c2JFo
BFS: https://youtu.be/YYq38LTz774
Topological Sort: https://youtu.be/qe_pQCh09yU
Solution CODE: https://gist.github.com/SuryaPratapK/031016cfa97e6aa33d46a7ef6bea147a
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Find Eventual Safe States
Leetcode #802
Algorithm: DFS / BFS / Topological Sort
DFS: https://youtu.be/CvUMf8c2JFo
BFS: https://youtu.be/YYq38LTz774
Topological Sort: https://youtu.be/qe_pQCh09yU
Solution CODE: https://gist.github.com/SuryaPratapK/031016cfa97e6aa33d46a7ef6bea147a
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Find Eventual Safe States - LeetCode
Can you solve this real interview question? Find Eventual Safe States - There is a directed graph of n nodes with each node labeled from 0 to n - 1. The graph is represented by a 0-indexed 2D integer array graph where graph[i] is an integer array of nodesβ¦
Day-28:
Maximal Network Rank
Leetcode #802
Algorithm: Simple Graph
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Maximal Network Rank
Leetcode #802
Algorithm: Simple Graph
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Maximal Network Rank - LeetCode
Can you solve this real interview question? Maximal Network Rank - There is an infrastructure of n cities with some number of roads connecting these cities. Each roads[i] = [ai, bi] indicates that there is a bidirectional road between cities ai and bi.
Theβ¦
Theβ¦
Day-28: (Solution)
Maximal Network Rank
Leetcode #1615
Algorithm: Simple Graph
Solution CODE: https://gist.github.com/SuryaPratapK/607a4ca794fa607efa9a0ac68bb92ca3
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Maximal Network Rank
Leetcode #1615
Algorithm: Simple Graph
Solution CODE: https://gist.github.com/SuryaPratapK/607a4ca794fa607efa9a0ac68bb92ca3
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Maximal Network Rank - LeetCode
Can you solve this real interview question? Maximal Network Rank - There is an infrastructure of n cities with some number of roads connecting these cities. Each roads[i] = [ai, bi] indicates that there is a bidirectional road between cities ai and bi.
Theβ¦
Theβ¦
Day-29:
Minimum Number of Vertices to Reach All Nodes
Leetcode #1557
Algorithm: Simple Graph
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Minimum Number of Vertices to Reach All Nodes
Leetcode #1557
Algorithm: Simple Graph
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
LeetCode
Minimum Number of Vertices to Reach All Nodes - LeetCode
Can you solve this real interview question? Minimum Number of Vertices to Reach All Nodes - Given a directed acyclic graph, with n vertices numbered from 0 to n-1, and an array edges where edges[i] = [fromi, toi] represents a directed edge from node fromi toβ¦
Day-1:
Container With Most Water
Leetcode #11
Algorithm: Two Pointer, Greedy
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon21 #microsoft11 #google7 #facebook3
Container With Most Water
Leetcode #11
Algorithm: Two Pointer, Greedy
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon21 #microsoft11 #google7 #facebook3
LeetCode
Container With Most Water - LeetCode
Can you solve this real interview question? Container With Most Water - You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).
Find two lines that togetherβ¦
Find two lines that togetherβ¦
Day-1: (Solution)
Container With Most Water
Leetcode #11
Algorithm: Two pointer, Greedy
Solution CODE:
https://gist.github.com/lavakush-m-tiwari/5472e7cb54482bd3f5217a36fda83359
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon21 #microsoft11 #google7 #facebook3
Container With Most Water
Leetcode #11
Algorithm: Two pointer, Greedy
Solution CODE:
https://gist.github.com/lavakush-m-tiwari/5472e7cb54482bd3f5217a36fda83359
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon21 #microsoft11 #google7 #facebook3
Day-2:
3Sum Closest
Leetcode #16
Algorithm: Two pointer, Sorting
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon10 #microsoft3 #google4 #facebook23
3Sum Closest
Leetcode #16
Algorithm: Two pointer, Sorting
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon10 #microsoft3 #google4 #facebook23
LeetCode
3Sum Closest - LeetCode
Can you solve this real interview question? 3Sum Closest - Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
Return the sum of the three integers.
You may assume that eachβ¦
Return the sum of the three integers.
You may assume that eachβ¦
Day-2(Solution):
3Sum Closest
Leetcode #16
Algorithm: Two pointer, Sorting
Solution Code :
https://gist.github.com/lavakush-m-tiwari/64a71c847ccbd9560b20a0f862187f49
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon10 #microsoft3 #google4 #facebook23
3Sum Closest
Leetcode #16
Algorithm: Two pointer, Sorting
Solution Code :
https://gist.github.com/lavakush-m-tiwari/64a71c847ccbd9560b20a0f862187f49
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon10 #microsoft3 #google4 #facebook23
Day-3:
Find the Duplicate Number
Leetcode #287
Algorithm: Two pointer, bit manipulation, Binary Search
Related Video: https://www.youtube.com/watch?v=dfIqLxAf-8s&ab_channel=TECHDOSE
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft5 #google4 #facebook3
Find the Duplicate Number
Leetcode #287
Algorithm: Two pointer, bit manipulation, Binary Search
Related Video: https://www.youtube.com/watch?v=dfIqLxAf-8s&ab_channel=TECHDOSE
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft5 #google4 #facebook3
LeetCode
Find the Duplicate Number - LeetCode
Can you solve this real interview question? Find the Duplicate Number - Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.
There is only one repeated number in nums, return this repeated number.β¦
There is only one repeated number in nums, return this repeated number.β¦
Day-3(Solution):
Find the Duplicate Number
Leetcode #287
Algorithm: Two pointer, bit manipulation, Binary Search
Related Video: https://www.youtube.com/watch?v=dfIqLxAf-8s&ab_channel=TECHDOSE
Solution: https://gist.github.com/lavakush-m-tiwari/627c6270f1095bbbf005a2f83d8b00ad
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft5 #google4 #facebook3
Find the Duplicate Number
Leetcode #287
Algorithm: Two pointer, bit manipulation, Binary Search
Related Video: https://www.youtube.com/watch?v=dfIqLxAf-8s&ab_channel=TECHDOSE
Solution: https://gist.github.com/lavakush-m-tiwari/627c6270f1095bbbf005a2f83d8b00ad
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft5 #google4 #facebook3
Day-4:
Minimum Size Subarray Sum
Leetcode #209
Algorithm: Binary Search, Sliding Window, Prefix Sum
Related Video: https://www.youtube.com/watch?v=S6Xg-0uaODc
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon4 #google2 #facebook4
Minimum Size Subarray Sum
Leetcode #209
Algorithm: Binary Search, Sliding Window, Prefix Sum
Related Video: https://www.youtube.com/watch?v=S6Xg-0uaODc
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon4 #google2 #facebook4
Day-4(Solution):
Minimum Size Subarray Sum
Leetcode #209
Algorithm: Binary Search, Sliding Window, Prefix Sum
Related Video: https://www.youtube.com/watch?v=S6Xg-0uaODc
Solution: https://gist.github.com/lavakush-m-tiwari/021f98e89a22503feb864bbe8f19ea3e
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon4 #google2 #facebook4
Minimum Size Subarray Sum
Leetcode #209
Algorithm: Binary Search, Sliding Window, Prefix Sum
Related Video: https://www.youtube.com/watch?v=S6Xg-0uaODc
Solution: https://gist.github.com/lavakush-m-tiwari/021f98e89a22503feb864bbe8f19ea3e
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon4 #google2 #facebook4
Day-5:
Merge Sorted Array
Leetcode #88
Algorithm: Two pointer, Sorting
Related Video: https://www.youtube.com/watch?v=DeLnQpIxo-A&list=PLEJXowNB4kPxQIN2dCUAnQ_92HIziG4x6&index=25
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft6 #facebook79
Merge Sorted Array
Leetcode #88
Algorithm: Two pointer, Sorting
Related Video: https://www.youtube.com/watch?v=DeLnQpIxo-A&list=PLEJXowNB4kPxQIN2dCUAnQ_92HIziG4x6&index=25
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft6 #facebook79
Day-5(Solution):
Merge Sorted Array
Leetcode #88
Algorithm: Two pointer, Sorting
Related Video: https://www.youtube.com/watch?v=DeLnQpIxo-A&list=PLEJXowNB4kPxQIN2dCUAnQ_92HIziG4x6&index=25
Solution: https://gist.github.com/lavakush-m-tiwari/f8e2f473a77a0b9aff38a31793c21e7e
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft6 #facebook79
Merge Sorted Array
Leetcode #88
Algorithm: Two pointer, Sorting
Related Video: https://www.youtube.com/watch?v=DeLnQpIxo-A&list=PLEJXowNB4kPxQIN2dCUAnQ_92HIziG4x6&index=25
Solution: https://gist.github.com/lavakush-m-tiwari/f8e2f473a77a0b9aff38a31793c21e7e
Please try the problem yourself and watch the video to learn the Algorithm π
Please SHARE this initiative with your friends as well π
#techdose #28DaysOfArray #interviewpreparation #arrays #dsa #MaxFreqLast6Months #amazon8 #microsoft6 #facebook79