This Repository is the home of all the pieces of code I have written or I will be writing during my journey to learn Data Structures and Algorithms.
Platforms Used for Practice - Coding Ninjas, Leetcode, GeeksForGeeks.
Do not forget to check "Code Dump" in this repository - it is the Collection of some Questions I found interesting to solve during this journey (These Questions are not included in any day's folder.)
Questions Marked with '*' are from Leetcode.
Questions Marked with '^' are from GeeksForGeeks.
Unmarked Questions are from Coding Ninjas.
Questions solved with more than one approach have descriptions about approaches with them.
If I created any Small projects during this, I have also mentioned them with the Day.
Total Questions - 41 (Till Day 8)
Topics: Selection Sort, Insertion Sort, Bubble Sort
Question Solved:
Topics: Merge Sort, Quick Sort, Recursive Insertion Sort, Recursive Bubble Sort
Questions Solved:
Topics: One Dimensional Array (Very Basic Questions)
Questions Solved:
- Largest Element in Array
- Second Largest & Second Smallest
- Check Sorted Array
- Remove Duplicates
- Contains Duplicate*
Topics: One Dimensional Array (Easy Questions)
Questions Solved:
- Valid Anagram* (Using String Sort & Without it)
- Two Sum* (With O(n^2) and O(n) Time Complexities)
- Left Rotate Array by 1 Place (Using Reverse from C++ STL & Using For Loop)
- Rotate Array*
- Linear Search
- Move All Zeroes to End
- Missing Numbers in AP
- Move Negative to Front & Positive to End
- Find the Fine^
- Greater on Right Side*
Created a Rock, Paper or Scissors game Click Here to check that out!
Topics: One Dimensional Array (Easy Questions)
Questions Solved:
- Merge Two Sorted Arrays
- Missing Number in Array*
- Maximum Consecutive Ones*
- Single Number*
- Best Time to Buy and Sell Stocks*
Topics: One Dimensional Array (Moderate Questions)
Questions Solved:
- Longest Subarray with Sum K (only Positive Numbers)
- Longest Subarray with Sum K (Both Positive & Negative Numbers)
- Sort Colours* (Dutch National Flag Algorithm)
- Majority Element* (Moore's Voting Algorithm)
- Maximum Subarray* (Kadane’s Algorithm)
Topics: Array (Moderate Questions)
Questions Solved:
- Rearrange Array Elements by Sign*
- Next Permutation*
- Superior Elements
- Set Matrix Zeroes*
- Rotate Image*
- Spiral Matrix*
- Subarray Sum equals K*
Topics: Binary Search & Array (Hard Questions)
Questions Solved:
- Binary Search (Iterative and Recursive)
- Pascal's Triangle*
- Majority Elements 2*
- Three Sum*
- Four Sum*