A tool for practicing technical interviews.
An AI interviewer, a plain editor, hidden tests, and an honest debrief.
Problems
Best Day to Buy and Sell
You are given the price of a stock on each day, in order. Return the largest profit you could make from one purchase and one sale.
easyarrays, greedy, running minimum
Merge Two Sorted Linked Lists
You are given the heads of two linked lists, each sorted in ascending order. Merge them into a single sorted list and return its head.
easylinked list, two pointers, merging
Most Frequent Word
Given a list of words, return the word that appears most often.
easyhash map, strings, counting
Remove Matching Nodes From List
Given the head of a singly linked list and an integer, remove the node holding that integer and return the head of the resulting list.
easylinked list, pointers
Reverse a Linked List
Given the head of a singly linked list, reverse the list and return the head of the reversed list.
easylinked list, pointers
Count Subarrays Summing to K
Given a list of integers and a target k, return the number of subarrays whose elements add up to k.
mediumarrays, prefix sums, hash map
Merge Overlapping Intervals
You are given a list of intervals, each written as a pair [start, end]. Merge the intervals that overlap and return the result.
mediumarrays, sorting, intervals
Product of All Other Elements
Given a list of integers, return a list of the same length in which each position holds the product of all the other elements. Do not use division.
mediumarrays, prefix products
Remove the Nth Node From the End
Given the head of a linked list and a positive integer n, remove the nth node from the end of the list and return the head.
mediumlinked list, two pointers