Skip to content

This repository contains all codes written during "Strivers SDE Sheet – Challenge".

Notifications You must be signed in to change notification settings

A-Spiral-Forge/Strivers-SDE-Sheet-Challenge

Repository files navigation

Strivers-SDE-Sheet-Challenge

This repository contains all codes written during "Strivers SDE Sheet – Challenge".


Topic wise list of problems and solutions

Topic: Arrays

Index Date Problem Name Solution
1 06.06.2023 Set Matrix Zeros C++
2 06.06.2023 Pascal's Triangle C++
3 06.06.2023 Next Permutation C++
4 06.06.2023 Maximum Subarray Sum (Kadane's Algorithm) C++
5 06.06.2023 Sort 0 1 2 (DNF Algorithm) C++
6 06.06.2023 Best Time to Buy and Sell Stock C++
7 06.06.2023 Rotate Matrix C++
8 06.06.2023 Merge Intervals C++
9 07.06.2023 Merge Two Sorted Arrays (Without Extra Space) C++
10 07.06.2023 Find Duplicate in an Array of N+1 Integers C++
11 07.06.2023 Missing and Repeating Numbers C++
12 07.06.2023 Inversion Count (Using Merge Sort) C++
13 07.06.2023 Search in a 2D Matrix C++
14 07.06.2023 Modular Exponentiation C++
15 07.06.2023 Majority Element (> N / 2) C++
16 07.06.2023 Majority Element (> N / 3) C++
17 07.06.2023 Unique Paths C++
18 07.06.2023 Pair Sum (Two Sum) C++
19 07.06.2023 Four Sum C++
20 07.06.2023 Longest Consecutive Sequence C++
21 07.06.2023 Reverse Pairs (Same as Inversion Count) C++
22 07.06.2023 Longest Subarray Zero Sum C++
23 07.06.2023 Count Subarrays with Given XOR C++
24 07.06.2023 Longest Substring Without Repeating Characters C++
25 08.06.2023 Three Sum C++
26 08.06.2023 Remove Duplicates from Sorted Array C++
27 08.06.2023 Maximum Consecutive Ones C++
28 08.06.2023 Trapping Rain Water C++

Topic: Linked List

Index Date Problem Name Solution
1 07.06.2023 Reverse Linked List C++
2 07.06.2023 Middle of Linked List C++
3 07.06.2023 Merge Two Sorted Linked Lists C++
4 07.06.2023 Remove Kth Node from Last C++
5 07.06.2023 Add Two Numbers as List C++
6 07.06.2023 Delete Node in a Linked List (Only Access to Node is Given) C++
7 08.06.2023 Intersection of Two Linked Lists C++
8 08.06.2023 Cycle Detection in a Singly Linked List C++
9 08.06.2023 Reverse Nodes in k-Group C++
10 08.06.2023 Palindrome Linked List C++
11 08.06.2023 First Node of Loop in a Linked List C++
12 08.06.2023 Flatten a Linked List C++
13 08.06.2023 Rotate a Linked List C++
14 08.06.2023 Copy List with Random Pointer C++

Topic: Greedy Algorithms

Index Date Problem Name Solution
1 08.06.2023 Maximum Meetings C++
2 08.06.2023 Minimum Number of Platforms C++
3 09.06.2023 Job Sequencing Problem C++
4 09.06.2023 Fractional Knapsack Problem C++
5 09.06.2023 Find Minimum Number of Coins C++
6 09.06.2023 Maximum Activities C++

Topic: Recursion and Backtracking

Index Date Problem Name Solution
1 09.06.2023 Subset Sum C++
2 09.06.2023 Subsets II C++
3 09.06.2023 Subset Sum to K C++
4 09.06.2023 Combination Sum II C++
5 09.06.2023 Palindrome Partitioning C++
6 09.06.2023 Kth Permutation Sequence C++
7 09.06.2023 Print Permutations C++
8 09.06.2023 N Queens C++
9 09.06.2023 Valid Sudoku C++
10 10.06.2023 M Coloring Problem C++
11 10.06.2023 Rat in a Maze All Paths C++
12 10.06.2023 Word Break II C++

Topic: Binary Search

Index Date Problem Name Solution
1 10.06.2023 Find Nth Root of M C++
2 11.06.2023 Matrix Median C++
3 11.06.2023 Single Element in a Sorted Array C++
4 11.06.2023 Search in a Rotated Sorted Array C++
5 11.06.2023 Median of Two Sorted Arrays C++
6 11.06.2023 Kth Element of Two Sorted Arrays C++
7 11.06.2023 Allocate Books C++
8 11.06.2023 Chess Tournament C++

Topic: Heaps

Index Date Problem Name Solution
1 11.06.2023 Min Heap C++
2 11.06.2023 Kth Smallest and Largest Element in Array C++
3 11.06.2023 K Max Sum Combinations C++
4 11.06.2023 Merge K Sorted Arrays C++
5 11.06.2023 K Most Frequent Elements C++
6 11.06.2023 Median of a Running Stream of Integers C++
7 17.06.2023 Meadian in a Stream C++
8 18.06.2023 Kth Largest Element in a Stream C++
9 18.06.2023 Kth Largest Element in an Unsorted Array C++

Topic: Trie

Index Date Problem Name Solution
1 11.06.2023 Implement Trie C++
2 12.06.2023 Implement Trie II C++
3 12.06.2023 Complete String C++
4 12.06.2023 Number of Distinct Substrings C++
5 12.06.2023 Maximum XOR of Two Numbers in an Array C++
6 12.06.2023 Maximum XOR With an Element From Array C++

Topic: Bit Manipulation

Index Date Problem Name Solution
1 12.06.2023 Power Set C++

Topic: Stacks and Queues

Index Date Problem Name Solution
1 12.06.2023 Implement Stack Using Array C++
2 12.06.2023 Implement Queue Using LL C++
3 12.06.2023 Implement Stack Using Queue C++
4 12.06.2023 Implement Queue Using Stack C++
5 12.06.2023 Valid Parentheses C++
6 12.06.2023 Next Greater Element C++
7 12.06.2023 Sort a Stack C++
8 12.06.2023 Next Smaller Element C++
9 12.06.2023 LRU Cache (Using DLL and Hashmap) C++
10 13.06.2023 Largest Rectangle in a Histogram C++
11 13.06.2023 Maximum in Sliding Window of Size K C++
12 13.06.2023 Min Stack C++
13 13.06.2023 Rotten Oranges (Using BFS Queue) C++
14 13.06.2023 Online Stock Span C++
15 13.06.2023 The Celebrity Problem C++
16 22.06.2023 Maximum of Minimum for Every Window Size C++
17 23.06.2023 LFU Cache (Using DLL and Hashmap) C++

Topic: String

Index Date Problem Name Solution
1 13.06.2023 Reverse Words in a String C++
2 13.06.2023 Longest Palindromic Substring (Two Pointer Approach) C++
3 13.06.2023 Longest Palindromic Substring (DP Approach) C++
4 13.06.2023 Roman Numeral to Integer C++
5 13.06.2023 Implement ATOI C++
6 14.06.2023 Longest Common Prefix (Trie Approach) C++
7 14.06.2023 Longest Common Prefix (Horizontal Scanning Approach) C++
8 14.06.2023 Longest Common Prefix (Binary Search Approach) C++
9 14.06.2023 Pattern Matching (Rabin Karp Algorithm) C++
10 14.06.2023 Pattern Matching (Z Algorithm) C++
11 14.06.2023 Pattern Matching (KMP Algorithm) C++
12 14.06.2023 Minimum Characters for Palindrome C++
13 14.06.2023 Check Permutation C++
14 14.06.2023 Count and Say C++
15 14.06.2023 Comapre Version Numbers C++

Topic: Binary Tree

Index Date Problem Name Solution
1 14.06.2023 Inorder Traversal C++
2 14.06.2023 Preorder Traversal C++
3 14.06.2023 Postorder Traversal C++
4 14.06.2023 Left View of Binary Tree C++
5 14.06.2023 Morris Inorder Traversal C++
6 14.06.2023 Morris Preorder Traversal C++
7 15.06.2023 Bottom View of Binary Tree C++
8 15.06.2023 Top View of Binary Tree C++
9 15.06.2023 Tree Traversals C++
10 15.06.2023 Vertical Order Traversal C++
11 15.06.2023 Path in a Tree C++
12 15.06.2023 Maximum Width in Binary Tree C++
13 15.06.2023 Level Order Traversal C++
14 15.06.2023 Height of Binary Tree From Inorder and Level Order Traversal C++
15 15.06.2023 Diameter of Binary Tree C++
16 15.06.2023 Is Height Balanced Binary Tree C++
17 15.06.2023 LCA of Binary Tree C++
18 15.06.2023 Check Identical Trees C++
19 15.06.2023 Binary Tree Zigzag Traversal C++
20 15.06.2023 Boundary Traversal of Binary Tree C++
21 15.06.2023 Maximum Path Sum Between Two Leaves C++
22 16.06.2023 Contruct Binary Tree from Inorder and Preorder Traversal C++
23 16.06.2023 Contruct Binary Tree from Inorder and Postorder Traversal C++
24 16.06.2023 Symmetric Tree C++
25 16.06.2023 Flatten Binary Tree to Linked List C++
26 16.06.2023 Children Sum Property C++
27 16.06.2023 Connect Nodes at Same Level C++
28 17.06.2023 Serialize and Deserialize Binary Tree C++
29 17.06.2023 Convert Binary Tree to DLL C++
30 23.06.2023 Invert a Binary Tree C++

Topic: Binary Search Tree

Index Date Problem Name Solution
1 16.06.2023 Search in BST C++
2 16.06.2023 Convert Sorted Array to BST C++
3 16.06.2023 Partial BST C++
4 16.06.2023 LCA of Two Nodes in a BST C++
5 16.06.2023 Predecessor and Successor in BST C++
6 16.06.2023 Floor in BST C++
7 17.06.2023 Construct BST from Preorder Traversal C++
8 17.06.2023 Ceil from BST C++
9 17.06.2023 Kth Largest Element in BST C++
10 17.06.2023 Kth Smallest Element in BST C++
11 17.06.2023 BST Iterator C++
12 17.06.2023 Pair Sum in BST C++
13 17.06.2023 Size of Largest BST in Binary Tree C++

Topic: Hashing

Index Date Problem Name Solution
1 18.06.2023 Count Distinct Elements in Every K Size Window C++

Topic: Graphs

Index Date Problem Name Solution
1 18.06.2023 Flood Fill C++
2 18.06.2023 Clone Graph C++
3 18.06.2023 DFS Traversal C++
4 18.06.2023 BFS Traversal C++
5 18.06.2023 Detect Cycle in Undirected Graph C++
6 18.06.2023 Detect Cycle in Directed Graph (DFS Approach) C++
7 19.06.2023 Detect Cycle in Directed Graph (BFS Approach) C++
8 19.06.2023 Topological Sort (DFS Approach) C++
9 19.06.2023 Topological Sort (BFS Approach) C++
10 19.06.2023 Find Number of Islands C++
11 19.06.2023 Check Bipartite Graph C++
12 20.06.2023 Dijkstra's Shortest Path (Using Priority Queue) C++
13 20.06.2023 Dijkstra's Shortest Path (Using Set) C++
14 20.06.2023 Bellman Ford Algorithm C++
15 20.06.2023 Floyd Warshall Algorithm C++
16 20.06.2023 Prim's MST Algorithm C++
17 21.06.2023 Kruskal's MST Algorithm C++
18 21.06.2023 Strongly Connected Components (Kosaraju's Algorithm) C++

Topic: Dynamic Programming

Index Date Problem Name Solution
1 21.06.2023 Maximum Product Subarray C++
2 21.06.2023 Longest Increasing Subsequence C++
3 21.06.2023 Longest Common Subsequence C++
4 21.06.2023 0 - 1 Knapsack Problem C++
5 21.06.2023 Edit Distance C++
6 22.06.2023 Maximum Sum Increasing Subsequence C++
7 22.06.2023 Count Distinct Ways to Reach Nth Stairs (Matrix Exponentiation) C++
8 22.06.2023 Minimum Path Sum C++
9 22.06.2023 Ways to Make Coin Change C++
10 22.06.2023 Subset Sum Equal to K C++
11 22.06.2023 Rod Cutting Problem C++
12 22.06.2023 Cut Logs C++
13 22.06.2023 Word Break C++
14 23.06.2023 Palindrome Partitioning II C++
15 23.06.2023 Matrix Chain Multiplication C++

About

This repository contains all codes written during "Strivers SDE Sheet – Challenge".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages