Skip to content

ShrutiSolani/DSA_Java

Repository files navigation

  1. Day 1

Data Structures and Algorithms

General

  1. Reverse Integer
  2. Check if a number is palindrome
  3. Guess Number Higher or Lower
  4. Minimum Time to Type Word Using Special Typewriter (Leetcode Biweekly contest 59)
  5. Maximum Matrix Sum (Leetcode Biweekly contest 59)
  6. Sum of Square Numbers (Binary Search)
  7. Majority Element (Boyer-Moore majority vote algorithm)
  8. Rotation Groups
  9. Robinhood

Array

  1. Reverse A String
  2. Maximum and minimum of an array using minimum number of comparisons
  3. Kth min element of array
  4. Sort array consisting of only 0,1,2 without sorting algo
  5. Move all negative elements to one side of the array
  6. Union of two sorted arrays
  7. Rotate array by one clockwise
  8. Kadane's Algorithm
  9. Minimum Number of Jumps
  10. Find the Duplicate Number
  11. Merge Intervals
  12. Find Median
  13. Median of two sorted arrays of different size
  14. Merge Intervals
  15. Next Permutation
  16. Count Inversion
  17. Best time to buy and sell stock
  18. Two Sum
  19. Chocolate Distribution
  20. Max Area of Rectangle in Histogram
  21. Merge two sorted arrays without using extra space
  22. Count Pairs with given sum
  23. Remove Duplicates from sorted array
  24. Factorial of Big Numbers
  25. Find Common Elements in 3 sorted arrays
  26. Subarray with 0 sum
  27. ALternate Positive and Negative Numbers
  28. Smallest SUbarray with sum greater than given value
  29. Three way partitioning
  30. Remove Element
  31. Median of Two Sorted Arrays
  32. Container with Most Water
  33. Search Insert Position (Binary Search)
  34. How Many Numers Are Smaller Than The Current Number
  35. Range Addition II
  36. Contains Duplicate
  37. Unidirectional Word Search

Matrix

  1. Spiral Traversal of a Matrix
  2. Search an element in a 2D Matrix
  3. Find Median in a row-wise sorted matrix
  4. Row with max 1s
  5. Sort matrix
  6. Max Area of Rectangle in Matrix
  7. Find a specific pair in Matrix
  8. Rotate matrix by 90 degrees Anti-clockwise
  9. Rotate matrix by 90 degrees Clockwise
  10. Kth smallest element in a sorted matrix
  11. Common Elements in all rows

String

  1. Reverse A String
  2. Palindrome
  3. Find Duplicate characters in a string
  4. Check whether one string is a rotation of another
  5. Check if a string is a valid shuffle of two distinct strings
  6. Count and Say problem
  7. Balanced Paranthesis
  8. Longest Palindrome In A String
  9. Find Length of Last Word
  10. Isomorphic Strings
  11. Converting Roman Numerals to Decimal
  12. Longest Common Prefix
  13. Longest Repeating Subsequence
  14. All Permutations of a given string
  15. Print All subsequences of a given string
  16. Split the binary string into substrings with equal number of 0s and 1s
  17. Converting Integer to Roman Numbers
  18. Longest Substring Without Repeating Characters
  19. Longest Palindromic Substring (Dynamic Approach)
  20. ZigZag Conversion
  21. String to Integer (atoi)
  22. Complex Number Multiplication
  23. String Multiplication
  24. Jewels and Stones
  25. Run-Length Decoded String Iterator (***)
  26. Permutation In String (Sliding Window approach)

Linked List

  1. Reverse a linked List (Iterative approach)
  2. Reverse a Linked List in groups of given size
  3. Detect Loop in a Linked List
  4. Remove Loop in Linked List
  5. Find first node of loop in Linked List
  6. Remove duplicate element from sorted Linked List
  7. Remove duplicates from an unsorted linked list
  8. Move last element to front of a given Linked List
  9. Merge two sorted Linked List
  10. Add Two Numbers
  11. Middle of the Linked List
  12. Remove Nth Node From End of List

Graphs

  1. Create a Graph and print it
  2. Breadth First Search Traversal
  3. Depth First Search Traversal
  4. Detect Cycle in a directed graph
  5. Detect Cycle in an undirected graph
  6. Clone a Graph
  7. Rat in a Maze Problem (Backtracking)

Bit Manipulation

  1. Number of 1 bits
  2. Non Repeating Numbers
  3. Count number of bits to be flipped to convert A to B
  4. Count set bits from 1 to N
  5. Check if given number is power of 2
  6. Find position of set bit
  7. Calculate square of a number without using *, / and pow()
  8. Power Set
  9. Copy Set Bits In a Range
  10. Divide two integers without using multiplication, division and mod operator
  11. Bit Sum

Binary Search

  1. Binary Search
  2. First Bad Version
  3. Search Insert Position (Array Problem 33)
  4. Find Minimum in Rotated Sorted Array

Squares of a Sorted Array

  1. Squares of a Sorted Array
  2. Rotate Array

Move Zeroes

  1. Move Zeroes
  2. Two Sum -II (Input Array Sorted)

Kadane's Algorithm

  1. Max Subarray Sum
  2. Flip Bits
  3. Maximum subarray sum after K concatenation
  4. Maximum Sum Rectangle

Dutch National Flag Algorithm

  1. Sort 0 1 2
  2. Quicksort using the Dutch national flag algorithm

Searching and Sorting

  1. Search In Rotated Sorted Array
  2. Form a Triangle
  3. First and Last Position of an element in Sorted Array
  4. Count Smaller or Equal elements in array
  5. Algorithm to find best insert position in sorted array

Circular Queue

  1. Circular Queue

Depth-First Search

  1. Flood Fill

Recursion

  1. Flood fill Algorithm
  2. Number of paths
  3. Combination Sum – Part 2
  4. Special Keyboard
  5. Josephus problem

Tree

  1. Left View of Binary Tree
  2. Check if BST

Leetcode Top Interview Questions Easy (Folder : Leetcode Easy)

Array

  1. Remove Duplicates from Sorted Array
  2. Best Time to Buy and Sell Stock II
  3. Rotate Array
  4. Contains Duplicate
  5. Single Number
  6. Intersection of Two Arrays II
  7. Plus One
  8. Move Zeroes
  9. Two Sum
  10. Valid Sudoku
  11. Rotate Image

Strings

  1. Reverse String
  2. Reverse Integer
  3. First Unique Character in a String
  4. Valid Anagram
  5. Valid Palindrome
  6. String to Integer (atoi)
  7. Implement strStr()
  8. Longest Common Prefix

Linked List

  1. Delete Node in a Linked List
  2. Remove Nth Node From End of List
  3. Reverse Linked List
  4. Merge Two Sorted Lists
  5. Palindrome Linked List
  6. Linked List Cycle

Tree

  1. Maximum Depth of Binary Tree
  2. Validate Binary Search Tree
  3. Symmetric Tree
  4. Binary Tree Level Order Traversal
  5. Convert Sorted Array to Binary Search Tree

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages