Skip to content

A repository containing important problems and concepts for interviews.

Notifications You must be signed in to change notification settings

abhayrp2000/Interview-Prepration

Repository files navigation

INTERVIEW PREPRATION

LEETCODE PROBLEMS

  • Two Sum
  • Minimum Size Subarray Sum
  • Median of Two Sorted Arrays
  • Reverse Integer
  • Container With Most Water
  • Valid Parentheses
  • Remove Duplicates from Sorted Array
  • Remove Element
  • Next Permutation
  • Search in Rotated Sorted Array
  • Search Insert Position
  • Trapping Rain Water
  • Rotate Image
  • Grouping Anagrams
  • Maximum Subarray
  • Pascal's Triangle
  • Best Time to Buy and Sell Stock II
  • Valid Palindrome
  • Single Number
  • Min Stack
  • Number of Islands
  • Happy Number
  • Contains Duplicate
  • Rotate Array
  • Power of Two
  • Product of Array Except Self
  • Valid Anagram
  • First Bad Version
  • Move Zeroes
  • Reverse string
  • Find the difference
  • Fizz Buzz
  • Minimum Moves to Equal Array Elements II
  • Subarray Sum Equals K
  • Palindromic Substrings
  • Linked List Cycle
  • Middle of the linked list
  • Linked List Cycle II
  • Valid Parenthesis String
  • Implement stack using Queues
  • Implement queue using stacks
  • Sliding Window Maximum
  • Design Circular Queue
  • NQueens
  • Sudoku Solver
  • Maximum element (sliding window)
  • Implement strstr()
  • Remove all adj duplicates in a string
  • sort according to frequency
  • backspace string compare
  • ransom note
  • jewels and stones
  • Largest Number

Sorting Algorithms

  • Selection Sort
  • Bubble sort
  • Insertion Sort
  • Merge sort
  • Quick sort
  • sorting a vector of pairs

Greedy Algorithms

  • Activity selection
  • Maximize toys

Linked List

  • Insertion at head,any position and tail
  • length of linked list
  • print the linked list
  • deletion at head,tail and position p
  • searching recursively,iteratively
  • building a linked list
  • reverse a linked list
  • mid point of a linked list
  • merging two sorted linked lists
  • merge sort for linked lists
  • Adding two numbers -Leetcode
  • Binary to decimal -Leetcode
  • Delete Node -Leetcode
  • Remove duplicates sorted linked list -Leetcode
  • Palindrome Linked list -Leetcode
  • Linked List elements(Remove) -Leetcode
  • next greater element -Leetcode
  • Add two numbers II -Leetcode
  • odd even linked list -Leetcode
  • split linked list in parts -Leetcode
  • Linkedlist components -Leetcode
  • sort list -leetcode
  • remove zero sum elements -Leetcode
  • partition list -Leetcode
  • insertion sort -Leetcode
  • remove duplicates II -Leetcode
  • rotate list -Leetcode
  • Merge k sorted list -Leetcode

Binary Seach

  • Search in a rotated sotrted array
  • upper and lower bound
  • kth root of a number
  • aggressive cows
  • book allocation

Binary Tree

  • Basics
  • count of nodes,sum of nodes
  • Inorder traversal -Leetcode
  • preorder traversal -Leetcode
  • Level order traversal I Leetcode
  • Level order traversal II Leetcode
  • Diameter of a binary tree -Leetcode
  • Binary tree is balanced or not -Leetcode
  • Lowest Common ancestor -Leetcode
  • Same tree -Leetcode
  • symmetric tree -Leetcode
  • Binary Tree Zigzag Level Order Traversal -Leetcode

Binary Search Tree

  • insertion and bfs
  • searching
  • deletion
  • bst from sorted array
  • bst from in and pre order traversal
  • Two Sum IV - Input is a BST -Leetcode
  • Kth Smallest Element in a BST -Leetcode

Hashing

  • How Many Numbers Are Smaller Than the Current Number -Leetcode
  • N-Repeated Element in Size 2N Array -Leetcode
  • Unique Number of Occurrences -Leetcode
  • zero sum subarray

Dynamic Programming

  • Fibonacci
  • MinCostClimbingStairs -Leetcode
  • Climbing stairs -Leetcode
  • Coin Change -Leetcode
  • Range Sum Query -Leetcode
  • Longest Increasing Subsequence -Leetcode
  • Longest Common Subsequence -Leetcode
  • Is Subsequence -Leetcode
  • Divisor Game -Leetcode
  • Matrix Sum Block -Leetcode
  • Range Sum Query 2D - Immutable -Leetcode
  • Minimum Path Sum- Leetcode
  • Unique Paths -Leetcode
  • Equal partition subset
  • subsets of a given sum
  • Rod cutting
  • house theif
  • longest palindromic substring
  • longest palindromic subsequence
  • count of number of palindromic substring
  • longest commom substring

Heap

  • Basics -insertion,deletion,print
  • Merge k sorted arrays
  • hotel visit

Graph

  • Adj List for unweighted and weighted graphs
  • breadth first search
  • shortest path from a single node
  • dfs
  • number of components in the graph
  • topological sort -dfs
  • topological sort -bfs
  • check if graph is a tree
  • djikstra
  • floof fill
  • Bellman Ford
  • Travelling salesman Problem
  • Surrounded regions