top of page

Software Engineer - DSA Interview Questions

Remove Element

Array / String

Easy

Remove Duplicates from Sorted Array

Array / String

Easy

Remove Duplicates from Sorted Array II

Array / String

Medium

Majority Element

Array / String

Easy

Rotate Array

Array / String

Medium

Best Time to Buy and Sell Stock

Array / String

Easy

Best Time to Buy and Sell Stock II

Array / String

Medium

Jump Game

Array / String

Medium

Jump Game II

Array / String

Medium

H-Index

Array / String

Medium

Insert Delete GetRandom O(1)

Array / String

Medium

Product of Array Except Self

Array / String

Medium

Gas Station

Array / String

Medium

Candy

Array / String

Hard

Trapping Rain Water

Array / String

Hard

Roman to Integer

Array / String

Easy

Integer to Roman

Array / String

Medium

Length of Last Word

Array / String

Easy

Longest Common Prefix

Array / String

Easy

Reverse Words in a String

Array / String

Medium

Zigzag Conversion

Array / String

Medium

Find the Index of the First Occurrence in a String

Array / String

Easy

Text Justification

Array / String

Hard

Valid Palindrome

Two Pointers

Easy

Is Subsequence

Two Pointers

Easy

Two Sum II - Input Array Is Sorted

Two Pointers

Medium

Container With Most Water

Two Pointers

Medium

3Sum

Two Pointers

Medium

Minimum Size Subarray Sum

Sliding Window

Medium

Longest Substring Without Repeating Characters

Sliding Window

Medium

Substring with Concatenation of All Words

Sliding Window

Hard

Minimum Window Substring

Sliding Window

Hard

Valid Sudoku

Matrix

Medium

Spiral Matrix

Matrix

Medium

Rotate Image

Matrix

Medium

Set Matrix Zeroes

Matrix

Medium

Game of Life

Matrix

Medium

Ransom Note

Hashmap

Easy

Isomorphic Strings

Hashmap

Easy

Word Pattern

Hashmap

Easy

Valid Anagram

Hashmap

Easy

Group Anagrams

Hashmap

Medium

Two Sum

Hashmap

Easy

Happy Number

Hashmap

Easy

Contains Duplicate II

Hashmap

Easy

Longest Consecutive Sequence

Hashmap

Medium

Summary Ranges

Intervals

Easy

Merge Intervals

Intervals

Medium

Insert Interval

Intervals

Medium

Minimum Number of Arrows to Burst Balloons

Intervals

Medium

Valid Parentheses

Stack

Easy

Simplify Path

Stack

Medium

Min Stack

Stack

Medium

Evaluate Reverse Polish Notation

Stack

Medium

Basic Calculator

Stack

Hard

Linked List Cycle

Linked List

Easy

Add Two Numbers

Linked List

Medium

Merge Two Sorted Lists

Linked List

Easy

Copy List with Random Pointer

Linked List

Medium

Reverse Linked List II

Linked List

Medium

Reverse Nodes in k-Group

Linked List

Hard

Remove Nth Node From End of List

Linked List

Medium

Remove Duplicates from Sorted List II

Linked List

Medium

Rotate List

Linked List

Medium

Partition List

Linked List

Medium

LRU Cache

Linked List

Medium

Maximum Depth of Binary Tree

Binary Tree General

Easy

Same Tree

Binary Tree General

Easy

Invert Binary Tree

Binary Tree General

Easy

Symmetric Tree

Binary Tree General

Easy

Construct Binary Tree from Preorder and Inorder Traversal

Binary Tree General

Medium

Construct Binary Tree from Inorder and Postorder Traversal

Binary Tree General

Medium

Populating Next Right Pointers in Each Node II

Binary Tree General

Medium

Flatten Binary Tree to Linked List

Binary Tree General

Medium

Path Sum

Binary Tree General

Easy

Sum Root to Leaf Numbers

Binary Tree General

Medium

Binary Tree Maximum Path Sum

Binary Tree General

Hard

Binary Search Tree Iterator

Binary Tree General

Medium

Count Complete Tree Nodes

Binary Tree General

Easy

Lowest Common Ancestor of a Binary Tree

Binary Tree General

Medium

Binary Tree Right Side View

Binary Tree BFS

Medium

Average of Levels in Binary Tree

Binary Tree BFS

Easy

Binary Tree Level Order Traversal

Binary Tree BFS

Medium

Binary Tree Zigzag Level Order Traversal

Binary Tree BFS

Medium

Minimum Absolute Difference in BST

Binary Search Tree

Easy

Kth Smallest Element in a BST

Binary Search Tree

Medium

Validate Binary Search Tree

Binary Search Tree

Medium

Number of Islands

Graph General

Medium

Surrounded Regions

Graph General

Medium

Clone Graph

Graph General

Medium

Evaluate Division

Graph General

Medium

Course Schedule

Graph General

Medium

Course Schedule II

Graph General

Medium

Snakes and Ladders

Graph BFS

Medium

Minimum Genetic Mutation

Graph BFS

Medium

Word Ladder

Graph BFS

Hard

Implement Trie (Prefix Tree)

Trie

Medium

Design Add and Search Words Data Structure

Trie

Medium

Word Search II

Trie

Hard

Letter Combinations of a Phone Number

Backtracking

Medium

bottom of page