dsa-interview-challenges icon indicating copy to clipboard operation
dsa-interview-challenges copied to clipboard

A curated list of data structures and algorithms problems along with the solution in JavaScript to crack engineering interviews

DSA Interview Challenges

A curated list of data structures and algorithms problems
along with the solution in JavaScript to crack engineering interviews

Go through Usage Guide before you start solving
To download all the challenges as pdf, click here


Newbie

  1. Running Sum of 1d Array
  2. Fibonacci Number
  3. Shuffle the Array
  4. Search Insert Position
  5. Pascal's Triangle
  6. Reverse String
  7. Matrix Diagonal Sum
  8. Reverse Integer
  9. Jewels and Stones
  10. Kids With the Greatest Number of Candies
  11. Maximum Product of Two Elements in an Array
  12. Merge Sorted Array

Warm Up

  1. Missing Number
  2. Majority Element
  3. Single Number
  4. Rotate Array
  5. Two Sum
  6. Move Zeroes
  7. Squares of a Sorted Array
  8. Maximum Subarray
  9. Search in Rotated Sorted Array
  10. Product of Array Except Self
  11. How Many Numbers Are Smaller Than the Current Number
  12. Best Time to Buy and Sell Stock

Array 1D

  1. Container With Most Water
  2. House Robber
  3. Sort Colors
  4. Subsets
  5. Combination Sum
  6. 3 Sum
  7. Find the Duplicate Number
  8. Coin Change
  9. Jump Game
  10. Kth Largest Element in an Array
  11. Longest Increasing Subsequence
  12. Maximum Product Subarray

Array 2D

  1. Search a 2D Matrix
  2. Spiral Matrix
  3. Flipping an Image
  4. Unique Paths
  5. Word Search
  6. Set Matrix Zeroes
  7. Number of Islands
  8. Minimum Path Sum
  9. Path With Minimum Effort
  10. Course Schedule
  11. Merge Intervals
  12. Non-overlapping Intervals

Strings

  1. Ransom Note
  2. Valid Parentheses
  3. Check if the Sentence Is Pangram
  4. Valid Anagram
  5. Longest Common Prefix
  6. Reverse Only Letters
  7. First Unique Character in a String
  8. Palindromic Substrings
  9. Longest Substring Without Repeating Characters
  10. Longest Palindromic Substring
  11. Group Anagrams
  12. Generate Parentheses

Linked List

  1. Middle of the Linked List
  2. Merge Two Sorted Lists
  3. Remove Duplicates from Sorted List
  4. Linked List Cycle
  5. Intersection of Two Linked Lists
  6. Reverse Linked List
  7. Add Two Numbers
  8. Palindrome Linked List
  9. Swapping Nodes in a Linked List
  10. Odd Even Linked List
  11. Reorder List
  12. Remove Nth Node From End of List

Binary Trees

  1. Path Sum
  2. Invert Binary Tree
  3. Cousins in Binary Tree
  4. Diameter of Binary Tree
  5. Binary Tree Paths
  6. Average of Levels in Binary Tree
  7. Maximum Depth of Binary Tree
  8. Merge Two Binary Trees
  9. Same Tree
  10. Sum of Left Leaves
  11. Leaf-Similar Trees
  12. Symmetric Tree

Binary Search Trees

  1. Range Sum of BST
  2. Search in a Binary Search Tree
  3. Minimum Absolute Difference in BST
  4. Minimum Distance Between BST Nodes
  5. Lowest Common Ancestor of a Binary Search Tree
  6. Validate Binary Search Tree

Stargazers

Stargazers repo roster for @sadanandpai/dsa-interview-challenges

Forkers

Forkers repo roster for @sadanandpai/dsa-interview-challenges

Contributing Guide

If you want to contribute, improve or suggest changes to this repo, then check out the Contributing Guide

License

This repository is MIT licensed. Read more