Skip to content

Latest commit

 

History

History
437 lines (365 loc) · 24.3 KB

README.md

File metadata and controls

437 lines (365 loc) · 24.3 KB

📟 Please give a star 🌟 to the repository if it helped you.


Programming Interview Questions

Leetcode Top 150 Problems - Link

Sorting Problems

  1. QuickSort implementation in java
  2. HeapSort implementation in java
  3. MergeSort implementation in java
  4. Selection Sort
  5. Bubble Sort
  6. Insertion Sort
  7. Sort an array of 0s, 1s and 2s | Dutch National Flag problem

Non-Comparison based Sorts

  1. Counting Sort

Searching and Sorting Problems

Easy

  1. Find first and last positions of an element in a sorted array
  2. Sort an array according to count of set bits
  3. Smallest factorial number
  4. Rearrange numbers with constant extra space
  5. Merge Sorted Array

Medium

  1. Search in Rotated Sorted Array
  2. Boyer-Moore Majority Voting Algorithm/ Majority Element
  3. Count triplets with sum smaller than X
  4. Minimum Swaps to Sort+
  5. Print all subarrays with 0 sum

Binary Search

Easy

Medium

Hard

Maths Problem

Easy

  1. Missing Number

Recursion

  1. Combination Sum
  2. Reverse a Stack
  3. Sort a stack

Medium

  1. Subset Sums
  2. Power (x,n)
  3. Count Good Numbers
  4. Subsets
  5. Combination Sum
  6. Combination Sum II
  7. Combination Sum III
  8. Letter Combinations of a Phone Number
  9. Subsets II
  10. Permutations
  11. Permutations II

LinkedList

Easy

  1. Design Linked List
  2. Linked List Cycle
  3. Reverse a DLL
  4. Middle of the Linked List
  5. Reverse Linked List

Medium

  1. Rotate List
  2. Find first node of loop in a linked list
  3. Segregate even and odd nodes in a Linked List
  4. Remove Nth Node From End of List
  5. Add 2 numbers in LL
  6. Add 1 to a Linked List Number
  7. Delete the Middle Node of a Linked List

Doubly LinkedList

  1. Delete all occurrences of a given key in a doubly linked list
  2. Find pairs with given sum in doubly linked list

Easy

Medium

String

Easy

Medium

Hard

Matrix

Easy

  1. Common elements in all rows of a given matrix

Medium

  1. Spirally traversing a matrix
  2. Search a 2D Matrix
  3. Row with max 1s
  4. Sort the given 2D Matrix
  5. Diagonal Traverse

Stacks & Queues

Basic

  1. Implement Stack using array
  2. Implement Queue using array

Easy

  1. Implement Circular Queue
  2. BFS - Number of Islands
  3. Valid Parentheses
  4. Expression contains redundant bracket or not
  5. Daily Temperatures
  6. Implement Queue using Stacks
  7. Implement Stack using Queues
  8. Keys and Rooms

Medium

  1. 🔥 BFS - Open the Lock
  2. Next Greater Element
  3. The Celebrity Problem
  4. Design a stack with operations on middle element
  5. Get minimum element from stack in O(1) time
  6. 🔥 Validate Stack Sequences
  7. 🔥 Valid Substring
  8. Inorder Traversal (Iterative)
  9. 🔥 Decode String
  10. 🔥 01 Matrix
  11. Online Stock Span
  12. Next Greater Element II
  13. Number of NGEs to the right

Prefix/Infix/Postfix

  1. Convert Infix to Postfix
  2. Prefix to Infix Conversion
  3. Prefix to Postfix Conversion
  4. Postfix to Prefix Conversion
  5. Postfix to Infix Conversion
  6. Convert Infix to Prefix

Binary Tree

Easy

  1. Maximum depth of binary tree
  2. Balanced Binary Tree
  3. Diameter of Binary Tree
  4. Same Tree

Medium

  1. ZigZag Tree Traversal
  2. Preorder, Inorder, and Postorder Traversal
  3. Binary Tree Level Order Traversal
  4. Binary Tree Maximum Path Sum
  5. [Boundary Traversal of binary tree]
  6. Top View of Binary Tree
  7. Bottom View of Binary Tree
  8. Binary Tree Right Side View
  9. Symmetric Tree
  10. Lowest Common Ancestor of a Binary Tree

Hard

Binary Search Tree

Easy

  1. Check for BST
  2. Search in a Binary Search Tree
  3. Floor Binary Search Tree
  4. Ceil Binary Search Tree
  5. Insert a given Node in Binary Search Tree

Medium

  1. Predecessor and Successor
  2. Delete Node in a BST
  3. Kth Smallest Element in a BST
  4. Validate Binary Search Tree
  5. Lowest Common Ancestor of a Binary Search Tree

Backtracking

Medium

  1. Permutations
  2. Permutations II
  3. Subsets
  4. Subsets II
  5. Combination Sum
  6. Combination Sum II
  7. Palindrome Partitioning

Dynamic Programming

1D DP

2D/3D DP and DP on Grids

Medium

Heap

Easy

  1. Implementation of a Heap

Medium

  1. Find K Closest Elements
  2. Kth Largest Element in an Array
  3. K largest elements
  4. Sort a K Sorted Array
  5. Top K Frequent Elements

Sliding Window

Easy

Medium

Greedy Algorithms

Easy

Medium

Graphs

Easy

Medium

Topo Sort and Problems

MinimumSpanningTree/DisjointSet Problems

Tries

Good Resources