Skip to content

Instantly share code, notes, and snippets.

PROBLEM 2: Two Sum

Problem Statement

Given an array of integers nums and an integer target, return the indices of the two numbers such that they add up to target.

Concepts Covered

  • Hash Map
  • Brute Force Search

Examples

PROBLEM 3: Merge Intervals

Problem Statement

Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals.

Concepts Covered

  • Sorting
  • Interval Merging

Examples

PROBLEM 4: Median of Two Sorted Arrays

Problem Statement

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).

Concepts Covered

  • Binary Search
  • Divide and Conquer

Examples

PROBLEM 5: Container With Most Water

Problem Statement

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai), n vertical lines are drawn. Find two lines that together with the x-axis forms a container, such that the container contains the most water.

Concepts Covered

  • Two Pointer Technique
  • Optimization

Examples

PROBLEM 10: Longest Substring with At Most K Distinct Characters

Problem Statement

Given a string s and an integer k, return the length of the longest substring that contains at most k distinct characters.

Concepts Covered

  • Sliding Window
  • HashMap for Character Frequency
  • Edge Case Handling

PROBLEM 7: Longest Consecutive Sequence

Problem Statement

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.

You must write an algorithm that runs in O(n) time.

Concepts Covered

  • HashSet for fast lookup
  • Greedy Expansion

PROBLEM 8: Word Ladder

Problem Statement

Given two words, beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that:

  1. Only one letter can be changed at a time.
  2. Each transformed word must exist in the wordList.

Return 0 if no such sequence.

PROBLEM 9: Regular Expression Matching

Problem Statement

Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*':

  • '.' Matches any single character.
  • '*' Matches zero or more of the preceding element.

The matching should cover the entire input string (not partial).

A List of problems for the technical interview phase along with a capstone project problem

PROBLEM 1: Longest Substring Without Repeating Characters

Problem Statement

Given a string s, find the length of the longest substring without repeating characters.

Concepts Covered

  • Sliding Window
  • Hashing

Fix the Bug – React + Three.js Canvas Game

Problem / Spec

Avatar: Elena is building a small 3D mini-game in React + Three.js. It renders a basic scene with a player cube that can move left and right. But there’s a bug: the cube sometimes jumps or lags when key events fire rapidly, and the frame render isn't synced well with React state.

Application: A React + Three.js app where you need to fix a real rendering + input issue.


Reproduce the Issue