This repo consists of aditya verma youtube channel code for different section, I am still working this soon it will be updated fully, This repo I made for the purpose of revision Time and space complexity will be updated for all programs. If you want to explore more programes of DSA you can visit this REPO
S.No | Problem | Handwritten Notes | Time | Space |
---|---|---|---|---|
1 | Nearest greater to right | 📘 | O(n) | O(n) |
2 | Nearest greater to left | 📘 | O(n) | O(n) |
3 | Nearest smaller to left | 📘 | O(n) | O(n) |
4 | Nearest Smaller to right | 📘 | O(n) | O(n) |
5 | Stock span problem | 📘 | O(n) | O(n) |
5 | Maximum Rectangular Area in a Histogram | 📘 | O(n) | O(n) |
6 | Max area rectangle in Binary matrix | 📘 | O(n) | O(n) |
S.No | Problem | Handwritten Notes | Time | Space |
---|---|---|---|---|
1 | Binary Search | 📘 | O(logn) | O(logn) |
2 | Binary search on reverse sorted array | 📘 | O(logn) | O(logn) |
3 | Order not known or Agonostic BS | 📘 | O(logn) | O(logn) |
S.No | Problem | Handwritten Notes | Time | Space |
---|---|---|---|---|
1 | Kth smallest element | 📘 | O(n log k) | O(n log k) |
2 | Kth largest element in an array | 📘 | O(n log k) | O(n log k) |
3 | Nearly Sorted Algorithm or sort k sorted array | 📘 | O(n log k) | O(n log k) |
S.No | Problem | Handwritten Notes | Time | Space |
---|---|---|---|---|
1 | Maximum Sum Subarray of size K | 📘 | O(n) | O(1) |
2 | First negative integer in every window of size k | 📘 | O(n) | O(K) |