Technical Interview Questions and Solutions

Browse our database of interview questions and full-length solutions from top companies

EASY
Data Structures and Algorithms
Reverse Linked List

Given the head of a linked list, reverse the list and return the new head.

MEDIUM
Data Structures and Algorithms
K Closest Points

Given a list of tuples that represent (X, Y) coordinates on an XY plane and an integer K, return a list of the K-closest points to the origin (0, 0).

Watch 1 interview
MEDIUM
Data Structures and Algorithms
Longest Substring Without Repeating Characters

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

HARD
Data Structures and Algorithms
Alien Dictionary

Given a lexicographically sorted list of words, return the order of the alphabet. Also seen as: Given a list of lists in a lexigraphic ordering, return the ordering of the characters in the language.

MEDIUM
Data Structures and Algorithms
Top K Frequent Elements

Given a non-empty array of integers, return the `k` most frequent elements

Ready to practice with a mock interview?

Book mock interviews with engineers from Google, Facebook, Amazon, or other top companies. Get detailed feedback on exactly what you need to work on. Everything is fully anonymous.

Computer Dude