Skip to content

ayush0402/striver-sde-sheet

Repository files navigation

striver-sde-sheet

Collection of my solutions to Striver's SDE Sheet.

My LeetCode account

Striver's SDE Sheet Link

Day 1 : Arrays
Problem Solution
Set Matrix Zeroes Link
Pascal's Triangle Link
Next Permutation Link
Kadane’s Algorithm Link
Sort an array of 0’s 1’s 2’s Link
Stock buy and Sell Link
Day 2 : Arrays-II
Problem Solution
Rotate Matrix Link
Merge Overlapping Subintervals Link
Merge two sorted Arrays without extra space Link
Find the duplicate in an array of N+1 integers. Link
Repeat and Missing Number Link
Inversion of Array (Pre-req: Merge Sort) Link
Day 3 : Arrays-III
Problem Solution
Search in a 2d Matrix Link
Pow(x,n) Link
Majority Element (>N/2 times) Link
Majority Element (>N/3 times) Link
Grid Unique Paths Link
Reverse Pairs Link
Day 4 : Arrays-IV
Problem Solution
2-Sum-Problem
4-sum-Problem
Longest Consecutive Sequence
Largest Subarray with 0 sum
Count number of subarrays with given Xor K
Longest Substring without repeat
Day 5 : Linked List
Problem Solution
Reverse a LinkedList
Find the middle of LinkedList
Merge Sorted LinkedList
Remove N-th node from back of LinkedList
Add two numbers as LinkedList
Delete a given node
Day 6 : Linked List-II
Problem Solution
Find intersection point of Y LinkedList
Detect a cycle in Linked List
Reverse a LinkedList in groups of size k.
Check if a LinkedList is palindrome or not.
Find the starting point of the Loop of LinkedList
Flattening of a LinkedList
Day 7 : Linked List and Arrays
Problem Solution
Rotate a LinkedList
Clone a Linked List with random and next pointer
3 sum
Trapping rainwater
Remove Duplicate from Sorted array
Max consecutive ones
Day 8 : Greedy Algorithm
Problem Solution
N meetings in one room
Minimum Platforms
Job sequencing Problem
Fractional Knapsack Problem
Minimum number of coins
Activity Selection
Day 23 : Graphs
Problem Solution
Clone a graph
DFS
BFS
Detect A cycle in Undirected Graph using BFS
Detect A cycle in Undirected Graph using DFS
Detect A cycle in a Directed Graph using DFS
Detect A cycle in a Directed Graph using BFS
Topological Sort BFS
Topological Sort DFS
Number of islands(Do in Grid and Graph Both)
Bipartite Check using BFS
Bipartite Check using DFS