Problem database last updated: June 20, 2025

YYelp logo

Yelp Coding Interview Questions

28 problems · 8 Easy, 15 Medium, 5 Hard · Ranked #70 of 458

Difficulty breakdown

8 Easy

29% · avg 23%

15 Medium

54% · avg 59%

5 Hard

18% · avg 18%

Top topics

string
64.3%2.3x
array
46.4%
hash-table
39.3%1.8x
sorting
25%1.7x
math
17.9%
breadth-first-search
10.7%

Interview profile

Based on 28 reported problems, Yelp interviews are in line with industry averages - 18% Hard vs 18% overall. The majority (54%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, Yelp puts unusual emphasis on randomized (10.7% of problems, 11.5x the industry average), bucket-sort (7.1% of problems, 9.2x the industry average), trie (7.1% of problems, 2.7x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are string (64.3%), array (46.4%), hash-table (39.3%), sorting (25%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 28 problems

Course Schedule

Solve

There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...

MediumVery Likely
depth-first-searchbreadth-first-searchgraph

Filter Restaurants by Vegan-Friendly, Price and Distance

Solve

Given the array restaurants where restaurants[i] = [idi, ratingi, veganFriendlyi, pricei, distancei]. You have to filter the restaurants using three filters.

MediumVery Likely
arraysorting

Destination City

Solve

You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination city, that...

EasyVery Likely
arrayhash-tablestring

Reverse Words in a String

Solve

Given an input string s, reverse the order of the words.

MediumVery Likely
two-pointersstring

Longest Common Prefix

Solve

Write a function to find the longest common prefix string amongst an array of strings.

EasyVery Likely
arraystringtrie

Valid Anagram

Solve

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

EasyVery Likely
hash-tablestringsorting

Reverse Linked List

Solve

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

EasyVery Likely
linked-listrecursion

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumVery Likely
arrayhash-tablestring

Decode String

Solve

Given an encoded string, return its decoded string.

MediumVery Likely
stringstackrecursion

Insert Delete GetRandom O(1)

Solve

Implement the RandomizedSet class:

MediumVery Likely
arrayhash-tablemath

Insert Delete GetRandom O(1) - Duplicates allowed

Solve

RandomizedCollection is a data structure that contains a collection of numbers, possibly duplicates (i.e., a multiset). It should support inserting and removing...

HardVery Likely
arrayhash-tablemath

String Compression

Solve

Given an array of characters chars, compress it using the following algorithm:

MediumVery Likely
two-pointersstring

Top K Frequent Elements

Solve

Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.

MediumVery Likely
arrayhash-tabledivide-and-conquer

Top K Frequent Words

Solve

Given an array of strings words and an integer k, return the k most frequent strings.

MediumVery Likely
arrayhash-tablestring

Word Ladder

Solve

A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that:

HardVery Likely
hash-tablestringbreadth-first-search

Word Ladder II

Solve

A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that:

HardVery Likely
hash-tablestringbacktracking

The Skyline Problem

Solve

A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Given the locations and heights of...

HardVery Likely
arraydivide-and-conquerbinary-indexed-tree

Check If a Word Occurs As a Prefix of Any Word in a Sentence

Solve

Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a prefix of any word in sentence.

EasyVery Likely
two-pointersstringstring-matching

Longest Substring Without Repeating Characters

Solve

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

MediumVery Likely
hash-tablestringsliding-window

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumVery Likely
arraysorting

Minimum Index Sum of Two Lists

Solve

Given two arrays of strings list1 and list2, find the common strings with the least index sum.

EasyVery Likely
arrayhash-tablestring

Find the Closest Palindrome

Solve

Given a string n representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one.

HardVery Likely
mathstring

Two Sum

Solve

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

EasyVery Likely
arrayhash-map

Remove Colored Pieces if Both Neighbors are the Same Color

Solve

There are n pieces arranged in a line, and each piece is colored either by 'A' or by 'B'. You are given a string colors of length n where colors[i] is the color...

MediumVery Likely
mathstringgreedy

Letter Case Permutation

Solve

Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string.

MediumVery Likely
stringbacktrackingbit-manipulation

Random Pick with Weight

Solve

You are given a 0-indexed array of positive integers w where w[i] describes the weight of the ith index.

MediumVery Likely
arraymathbinary-search

Minimum String Length After Removing Substrings

Solve

You are given a string s consisting only of uppercase English letters.

EasyLikely
stringstacksimulation

Shortest and Lexicographically Smallest Beautiful String

Solve

You are given a binary string s and a positive integer k.

MediumLikely
stringsliding-window

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Yelp interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Yelp coding interview

Yelp interviews focus heavily on string, array, hash-table problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Yelp interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Yelp ask in interviews?add

Yelp has been reported to ask 28 distinct coding problems. The most common topics are string, array, hash-table. 8 are Easy difficulty, 15 are Medium, and 5 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Yelp coding interviews?add

Based on 28 reported problems, Yelp interviews are in line with industry averages - 18% Hard vs 18% overall. 54% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Yelp coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: string, array, hash-table. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Yelp interview?

Simulate a real Yelp coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Yelp interview with AIarrow_forward