Aditya-verma-youtube-playlist-code
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
Show some Β β€οΈΒ by starring this repository! It will push me to give more percentage of efforts
Dynamic Programming
Stack
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) |
Binary Search
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) |
Heap
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) |
Sliding Window
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) |