Skip to content

A small repository where I learn Data Structure and Algorithms everyday.

Notifications You must be signed in to change notification settings

anishsingh42/DSA_EveryDay

Repository files navigation

DSA_EveryDay

Data Structures

  1. Arrays

    1. Polynomial
      1. Polynomial Definition
      2. Polynomial Operation - Addition
    2. Matrix/2-D Matrix
      1. Matrix Addition and Multiplication
      2. Sparse Matrix Definition
  2. Linked List :

    1. Singly Linked List:

      1. Insertion at Start of LL
      2. Deletion at Start of LL
      3. Insertion at the ith position
      4. Deletion at the ith position
      5. Insertion at the end of LL
      6. Deletion at the end of LL
      7. Reverse a singly linked list
      8. Printing a LL using recursion
    2. Doubly Linked List

      1. Insertion at Start of LL
      2. Insertion at the ith position
      3. Insertion at the end of LL
      4. Printing a LL using recursion
    3. Circular Linked List

      1. Insertion in Circular Single LL
      2. Deletion in Circular Single LL
    4. Linked List Using Classes

      1. Single Linked List
  3. Stacks

    1. Implementation using Array
    2. Implementation using Linked List
    3. Using stack to reverse string
    4. Using stack to reverse Linked List
    5. Check for balanced Parentheses
    6. PostFix expression evaluation using Stacks
  4. Queues

    1. Implementation using Linear Array
    2. Implementation using Circular Array
    3. Implementation using Linked List
  5. Trees

    1. Binary Search Tree

Algorithms

  1. Search
    1. Linear Search
    2. Binary Search
  2. Sort
    1. Selection Sort
    2. Bubble Sort
    3. Insertion Sort
    4. Merge Sort
    5. Quick Sort
  3. Sieve Algorithms
    1. Sieve Of Eratosthenes
    2. Segmented Sieve
  4. GCD Rules & Algorithms and Modulo Mathematics
    1. Euclid's Algorithm
    2. Fast Exponentiation or Modular Exponentiation
  5. Basic Algorithms
    1. Kadane's Algorithm

Questions

  1. Date: 15th Sept 2021 - Sort array of 0's , 1's and 2's

  2. Date: 16th Sept 2021 - N meeting from one room

  3. Date: 17th Sept 2021 - Kth element of two sorted array of different size

  4. Date: 18th Sept 2021 - Sum Query 2

  5. Date: 19th Sept 2021 - Medians of two arrays of different size

  6. Date: 20th Sept 2021 - Factorials of large numbers

  7. Date: 21st Sept 2021 - Dam of candies

  8. Date: 22nd Sept 2021 - Repeated String Match

  9. Date: 23rd Sept 2021 - Count the total set bits for N natural numbers

  10. Date: 24th Sept 2021 - First and last occurrence

  11. Date: 25th Sept 2021 - Largest subarray with sum 0

  12. Date: 21st Oct 2021 - Print all the Duplicates in a string

  13. Date: 25th Oct 2021

    1. -Check whether string is rotation of other
    2. -Check whether string is valid shuffle of another string
  14. Date: 26 th Oct 2021 -Count and Say

  15. Date: 10 th Nov 2021 - Palindrome Linked List

  16. Date: 18th Nov 2021 - Upper Case Lower CAse and Numeric.

  17. Date: 22nd Nov 2021

    1. -Pattern problems
    2. -Subtract Product and Sum of a number
    3. -Number of Set bits or Hamming Weights
  18. Date: 23rd Nov 2021

    1. Reverse an Integer
    2. Complement of Integer with base 10
    3. Decimal to Binary
  19. Date: 7th Dec 2021

    1. Sum of n Integers in an array
    2. Reverse an Array
    3. Swap Alternatives in an array
    4. Single Number in Array
    5. Unique Number of Occurrences in Array
    6. Find Duplicate in Array
  20. Date: 8th Dec 2021

    1. Intersection of Two Arrays
    2. Pair Sum/Two Sum
    3. Sort 0s and 1s without using sorting
    4. Sort 0s , 1s and 2s without using sorting
    5. First and Last Occurrence of an Element in an array
    6. Find the Total number of Occurrence of an element
  21. Date: 9th Dec 2021

    1. Peak of the Mountain
    2. Pivot in a sorted array/MiddleMost index in a sorted array
    3. Find Minimum in Rotated Sorted Array
  22. Date: 10th Dec 2021

    1. Hills and Valleys
  23. Date: 12th Dec 2021

    1. Apple Shop with Ninja
    2. Three Way Split
    3. Checkmate
  24. Date: 15th Dec 2021

    1. Square Root of a number using Binary Search
  25. Date: 1st Jan 2022

    1. Book Allocation Problem(V.Imp)
    2. Painter's partition Problem(V.Imp)
    3. Aggressive Cow's (V.Imp)
    4. Merge two Sorted array
  26. Date: 3rd Jan 2022

    1. Move Zero's
    2. Rotated Array
  27. Date: 5th Jan 2022

    1. Check if array sorted and rotated
    2. Add 2 Array
    3. Valid Palindrome
    4. Reverse Words in a String 2
    5. Maximum and Minimum in an Array
  28. Date: 6th Jan 2022

    1. Maximum Occurring character in a string
    2. Space in string turned into @40
    3. Remove all occurrence of substring from string
  29. Date: 7th Jan 2022

    1. Covid Spread
    2. Prime in a Binary String
  30. Date: 8th Jan 2022

    1. Spiral Print
    2. Rotate Matrix by 90 degree ClockWise
    3. Search a 2D Matrix using Binary Search-1
    4. Search a 2D Matrix using Search-2
  31. Date: 17th Jan 2022

    1. Climb the stairs (Recursive Solution)
    2. Say Count
    3. Is Sorted Using Recursive Method
    4. Sum of array elements using Recursive Method
    5. Linear Search Recursive Method
    6. Bineary Search Recursive Method
  32. Date: 18th Jan 2022

    1. First and Last Occurrence Recursive Method
    2. Total Number of Occurrence Recusive Method
    3. Peak of Mountain Recursive Method
    4. Reverse String Using Recursive Method
    5. 'a' to the power 'b' recursive Method
  33. Date: 22nd Jan 2022

    1. Merge Sort
    2. Quick Sort
  34. Date: 26th Jan 2022

    1. Subsets
    2. Phone Number String Problem
  35. Date: 28th Jan 2022

    1. Min Max Swap
    2. Merge two sorted array with extra space
    3. Merge two sorted array without extra space
  36. Date: 29th Jan 2022

    1. Permutaions
  37. Date: 30th Jan 2022

    1. ABC
  38. Date: 2nd Feb 2022

    1. Next Permutation
    2. Count Inversion
  39. Date: 9th Feb 2022

    1. Middle of LL
    2. Reverse LL Nodes in Grps of K
  40. Date: 16 Feb 2022

    1. Linked List Cycle
    2. Detect and Remove loop from LL
    3. Remove Duplicates from sorted LL
    4. Remove Duplicates from unsorted LL
  41. Date: 17 Feb 2022

    1. Sort 0,1 and 2 in LL
    2. Check whether a LL is palindrome or not
  42. Date: 29th March 2022

    1. Implement two Stacks using a array
    2. Reverse a String using a stack
    3. Valid Parentheses
    4. Delete Middle Most Element in Stack
    5. Reverse a Stack using recursion
    6. Sort a stack
    7. Rebundant Brackets
    8. Minimum cost for bracket reversal
  43. Date: 1st April 2022

    1. Next Smaller Element
    2. Largest Area of Rectangle in Histogram
    3. Celebrity Problem
    4. Max Rectangle in binary matrix will all 1's
  44. Date: 2nd April 2022

    1. N stacks in an array
    2. Get Minimum in constant space and time complexity
  45. Date: 7th April 2022

    1. Reversal of Queue
    2. Find th first negative integer in the window
    3. Reverse first K elements in queue
    4. First non-repeating character in a stream
  46. Date: 13th April 2022

    1. Circular Tour
  47. Date: 14th April 2022

    1. Interleave the first half of the queue with second half
    2. K Queue in a single array