Skip to content

nikkhilpareek/Data-Structures-and-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms

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)

Day - 1

Topics: Selection Sort, Insertion Sort, Bubble Sort

Question Solved:

  1. Selection Sort
  2. Insertion Sort
  3. Bubble Sort

Day - 2

Topics: Merge Sort, Quick Sort, Recursive Insertion Sort, Recursive Bubble Sort

Questions Solved:

  1. Merge Sort
  2. Quick Sort
  3. Recursive Insertion Sort
  4. Recursive Bubble Sort

Day - 3

Topics: One Dimensional Array (Very Basic Questions)

Questions Solved:

  1. Largest Element in Array
  2. Second Largest & Second Smallest
  3. Check Sorted Array
  4. Remove Duplicates
  5. Contains Duplicate*

Day - 4

Topics: One Dimensional Array (Easy Questions)

Questions Solved:

  1. Valid Anagram* (Using String Sort & Without it)
  2. Two Sum* (With O(n^2) and O(n) Time Complexities)
  3. Left Rotate Array by 1 Place (Using Reverse from C++ STL & Using For Loop)
  4. Rotate Array*
  5. Linear Search
  6. Move All Zeroes to End
  7. Missing Numbers in AP
  8. Move Negative to Front & Positive to End
  9. Find the Fine^
  10. Greater on Right Side*

Day - 5

Created a Rock, Paper or Scissors game Click Here to check that out!

Topics: One Dimensional Array (Easy Questions)

Questions Solved:

  1. Merge Two Sorted Arrays
  2. Missing Number in Array*
  3. Maximum Consecutive Ones*
  4. Single Number*
  5. Best Time to Buy and Sell Stocks*

Day - 6

Topics: One Dimensional Array (Moderate Questions)

Questions Solved:

  1. Longest Subarray with Sum K (only Positive Numbers)
  2. Longest Subarray with Sum K (Both Positive & Negative Numbers)
  3. Sort Colours* (Dutch National Flag Algorithm)
  4. Majority Element* (Moore's Voting Algorithm)
  5. Maximum Subarray* (Kadane’s Algorithm)

Day - 7

Topics: Array (Moderate Questions)

Questions Solved:

  1. Rearrange Array Elements by Sign*
  2. Next Permutation*
  3. Superior Elements
  4. Set Matrix Zeroes*
  5. Rotate Image*
  6. Spiral Matrix*
  7. Subarray Sum equals K*

Day - 8

Topics: Binary Search & Array (Hard Questions)

Questions Solved:

  1. Binary Search (Iterative and Recursive)
  2. Pascal's Triangle*
  3. Majority Elements 2*
  4. Three Sum*
  5. Four Sum*

Author

My Codewars Stats

CodeWars Profile

My Leetcode Stats

LeetCode Stats