Searching interview questions
Practice 11 questions on searching. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
11 questions
- JavaScriptCoding exercise
Find Index
EASYImplement a function that returns the index of the first array element matching a predicate, or -1 if none match.
15 minPractice - JavaScriptCoding exercise
Find Last Index
EASYImplement a function that returns the index of the last array element matching a predicate, or -1 if none match.
15 minPractice - AlgorithmsCoding exercise
Find Missing Number in Sequence
EASYImplement a function that returns the single missing number from a sorted sequence of integers.
15 minPractice - AlgorithmsCoding exercise
Pair Sum
EASYImplement a function that finds two numbers in an array that add up to a given target.
15 minPractice - AlgorithmsCoding exercise
Binary Search
MEDIUMImplement binary search on a sorted array, returning the index of the target or -1 when absent.
25 minPractice - AlgorithmsCoding exercise
Find Element in Rotated Array
MEDIUMImplement a function that locates a target integer in a sorted array that has been rotated at an unknown pivot.
25 minPremium questionPractice - AlgorithmsCoding exercise
Map With History
MEDIUMImplement a class that records timestamped writes and returns the most recent value at or before a queried timestamp.
25 minAirbnb · Anthropic · OpenAIPractice - AlgorithmsCoding exercise
Smallest Element in Rotated Sorted Array
MEDIUMImplement a function that finds the minimum value in a sorted array that has been rotated at an unknown pivot.
25 minPremium questionPractice - JavaScriptCoding exercise
Text Search II
MEDIUMImplement a function that wraps every occurrence of any term from a list inside highlight markup.
25 minPremium questionAnthropic · Google · MetaPractice - AlgorithmsCoding exercise
Word Finder
MEDIUMImplement a data structure that supports adding words and searching with a wildcard character that matches any letter.
25 minPractice - JavaScriptCoding exercise
Data Selection
HARDImplement a function that filters an array of row objects by a flexible field-and-condition specification.
40 minAmazon · Meta · OpenAI +3Practice