Problem database last updated: June 20, 2025

CCitadel logo

Citadel Coding Interview Questions

88 problems · 4 Easy, 56 Medium, 28 Hard · Ranked #25 of 458

Difficulty breakdown

4 Easy

5% · avg 23%

56 Medium

64% · avg 59%

28 Hard

32% · avg 18%

Top topics

array
61.4%
dynamic-programming
29.5%1.5x
hash-table
22.7%
string
21.6%
breadth-first-search
19.3%2.3x
depth-first-search
15.9%1.7x

Interview profile

Based on 88 reported problems, Citadel interviews are significantly harder than average - 32% Hard vs 18% across all companies. The majority (64%) 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, Citadel puts unusual emphasis on topological-sort (8% of problems, 6.8x the industry average), geometry (2.3% of problems, 4.2x the industry average), randomized (3.4% of problems, 3.7x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (61.4%), dynamic-programming (29.5%), hash-table (22.7%), string (21.6%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 88 problems

Longest Non-decreasing Subarray From Two Arrays

Solve

You are given two 0-indexed integer arrays nums1 and nums2 of length n.

MediumVery Likely
arraydynamic-programming

Binary Tree Maximum Path Sum

Solve

A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ...

HardVery Likely
dynamic-programmingtreedepth-first-search

Delete and Earn

Solve

You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times:

MediumVery Likely
arrayhash-tabledynamic-programming

Palindromic Substrings

Solve

Given a string s, return the number of palindromic substrings in it.

MediumVery Likely
two-pointersstringdynamic-programming

Sliding Window Maximum

Solve

You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see...

HardVery Likely
arrayqueuesliding-window

Count Palindromic Subsequences

Solve

Given a string of digits s, return the number of palindromic subsequences of s having length 5. Since the answer may be very large, return it modulo 109 + 7.

HardVery Likely
stringdynamic-programming

LFU Cache

Solve

Design and implement a data structure for a Least Frequently Used (LFU) cache.

HardVery Likely
hash-tablelinked-listdesign

Minimum Equal Sum of Two Arrays After Replacing Zeros

Solve

You are given two arrays nums1 and nums2 consisting of positive integers.

MediumVery Likely
arraygreedy

Maximum Total Damage With Spell Casting

Solve

A magician has various spells.

MediumVery Likely
arrayhash-tabletwo-pointers

LRU Cache

Solve

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.

MediumLikely
hash-tablelinked-listdesign

Best Position for a Service Centre

Solve

A delivery company wants to build a new service center in a new city. The company knows the positions of all the customers in this city on a 2D-Map and wants to...

HardLikely
arraymathgeometry

Maximum Length of Repeated Subarray

Solve

Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays.

MediumLikely
arraybinary-searchdynamic-programming

Evaluate Division

Solve

You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai /...

MediumLikely
arraystringdepth-first-search

First Completely Painted Row or Column

Solve

You are given a 0-indexed integer array arr, and an m x n integer matrix mat. arr and mat both contain all the integers in the range [1, m n].

MediumLikely
arrayhash-tablematrix

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...

MediumLikely
arraysorting

Longest String Chain

Solve

You are given an array of words where each word consists of lowercase English letters.

MediumLikely
arrayhash-tabletwo-pointers

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasyLikely
arraydynamic-programming

Find the Duplicate Number

Solve

Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.

MediumLikely
arraytwo-pointersbinary-search

Serialize and Deserialize Binary Tree

Solve

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitte...

HardLikely
stringtreedepth-first-search

Evaluate Reverse Polish Notation

Solve

You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation.

MediumLikely
arraymathstack

Insert Delete GetRandom O(1)

Solve

Implement the RandomizedSet class:

MediumLikely
arrayhash-tablemath

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumLikely
arraydepth-first-searchbreadth-first-search

Length of Longest Subarray With at Most K Frequency

Solve

You are given an integer array nums and an integer k.

MediumLikely
arrayhash-tablesliding-window

Parallel Courses III

Solve

You are given an integer n, which indicates that there are n courses labeled from 1 to n. You are also given a 2D integer array relations where relations[j] = [...

HardLikely
arraydynamic-programminggraph

Sudoku Solver

Solve

Write a program to solve a Sudoku puzzle by filling the empty cells.

HardLikely
arrayhash-tablebacktracking

Group Anagrams

Solve

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

MediumLikely
arrayhash-tablestring

Couples Holding Hands

Solve

There are n couples sitting in 2n seats arranged in a row and want to hold hands.

HardLikely
greedydepth-first-searchbreadth-first-search

Permutations

Solve

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

MediumLikely
arraybacktracking

Merge k Sorted Lists

Solve

You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.

HardLikely
linked-listdivide-and-conquerheap-priority-queue

Validate Binary Search Tree

Solve

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

MediumLikely
treedepth-first-searchbinary-search-tree

Find Median from Data Stream

Solve

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two midd...

HardLikely
two-pointersdesignsorting

Combination Sum

Solve

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...

MediumLikely
arraybacktracking

Best Time to Buy and Sell Stock II

Solve

You are given an integer array prices where prices[i] is the price of a given stock on the ith day.

MediumLikely
arraydynamic-programminggreedy

Design Circular Queue

Solve

Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In Fi...

MediumLikely
arraylinked-listdesign

Search Suggestions System

Solve

You are given an array of strings products and a string searchWord.

MediumLikely
arraystringbinary-search

Regular Expression Matching

Solve

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

HardLikely
stringdynamic-programmingrecursion

N-Queens

Solve

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.

HardLikely
arraybacktracking

Trapping Rain Water

Solve

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

HardLikely
arraytwo-pointersdynamic-programming

Binary Tree Zigzag Level Order Traversal

Solve

Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level...

MediumLikely
treebreadth-first-searchbinary-tree

Fizz Buzz

Solve

Given an integer n, return a string array answer (1-indexed) where:

EasyLikely
mathstringsimulation

Best Time to Buy and Sell Stock III

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

HardLikely
arraydynamic-programming

Sqrt(x)

Solve

Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well.

EasySometimes
mathbinary-search

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumSometimes
arraytwo-pointerssorting

Perfect Squares

Solve

Given an integer n, return the least number of perfect square numbers that sum to n.

MediumSometimes
mathdynamic-programmingbreadth-first-search

House Robber

Solve

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...

MediumSometimes
arraydynamic-programming

Climbing Stairs

Solve

You are climbing a staircase. It takes n steps to reach the top.

EasySometimes
mathdynamic-programmingmemoization

Median of Two Sorted Arrays

Solve

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.

HardSometimes
arraybinary-searchdivide-and-conquer

Letter Combinations of a Phone Number

Solve

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

MediumSometimes
hash-tablestringbacktracking

Word Search

Solve

Given an m x n grid of characters board and a string word, return true if word exists in the grid.

MediumSometimes
arraystringbacktracking

Maximal Square

Solve

Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.

MediumSometimes
arraydynamic-programmingmatrix

Implement Trie (Prefix Tree)

Solve

A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various appl...

MediumSometimes
hash-tablestringdesign

Find Servers That Handled Most Number of Requests

Solve

You have k servers numbered from 0 to k-1 that are being used to handle multiple requests simultaneously. Each server has infinite computational capacity but ca...

HardSometimes
arrayheap-priority-queuesimulation

Sort Items by Groups Respecting Dependencies

Solve

There are n items each belonging to zero or one of m groups where group[i] is the group that the i-th item belongs to and it's equal to -1 if the i-th item belo...

HardSometimes
depth-first-searchbreadth-first-searchgraph

Design Front Middle Back Queue

Solve

Design a queue that supports push and pop operations in the front, middle, and back.

MediumSometimes
arraylinked-listdesign

Longest Increasing Path in a Matrix

Solve

Given an m x n integers matrix, return the length of the longest increasing path in matrix.

HardSometimes
arraydynamic-programmingdepth-first-search

Minimum Height Trees

Solve

A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree.

MediumSometimes
depth-first-searchbreadth-first-searchgraph

Count Ways To Build Good Strings

Solve

Given the integers zero, one, low, and high, we can construct a string by starting with an empty string, and then at each step perform either of the following:

MediumSometimes
dynamic-programming

Transform to Chessboard

Solve

You are given an n x n binary grid board. In each move, you can swap any two rows with each other, or any two columns with each other.

HardSometimes
arraymathbit-manipulation

Search a 2D Matrix II

Solve

Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties:

MediumSometimes
arraybinary-searchdivide-and-conquer

Max Points on a Line

Solve

Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum number of points that lie on the same straight line.

HardSometimes
arrayhash-tablemath

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...

MediumSometimes
depth-first-searchbreadth-first-searchgraph

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...

HardSometimes
arrayhash-tablemath

Simplify Path

Solve

You are given an absolute path for a Unix-style file system, which always begins with a slash '/'. Your task is to transform this absolute path into its simplif...

MediumSometimes
stringstack

Permutations II

Solve

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.

MediumSometimes
arraybacktrackingsorting

Asteroid Collision

Solve

We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space...

MediumSometimes
arraystacksimulation

Longest Common Subsequence

Solve

Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0.

MediumSometimes
stringdynamic-programming

Pow(x, n)

Solve

Implement pow(x, n), which calculates x raised to the power n (i.e., xn).

MediumSometimes
mathrecursion

Integer to Roman

Solve

Seven different symbols represent Roman numerals with the following values:

MediumSometimes
hash-tablemathstring

Koko Eating Bananas

Solve

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

MediumSometimes
arraybinary-search

Longest Increasing Subsequence

Solve

Given an integer array nums, return the length of the longest strictly increasing subsequence.

MediumSometimes
arraybinary-searchdynamic-programming

Container With Most Water

Solve

You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).

MediumSometimes
arraytwo-pointersgreedy

Reorganize String

Solve

Given a string s, rearrange the characters of s so that any two adjacent characters are not the same.

MediumSometimes
hash-tablestringgreedy

Egg Drop With 2 Eggs and N Floors

Solve

You are given two identical eggs and you have access to a building with n floors labeled from 1 to n.

MediumSometimes
mathdynamic-programming

Populating Next Right Pointers in Each Node

Solve

You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:

MediumSometimes
linked-listtreedepth-first-search

Knight Probability in Chessboard

Solve

On an n x n chessboard, a knight starts at the cell (row, column) and attempts to make exactly k moves. The rows and columns are 0-indexed, so the top-left cell...

MediumSometimes
dynamic-programming

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...

HardSometimes
arraydivide-and-conquerbinary-indexed-tree

Count Number of Maximum Bitwise-OR Subsets

Solve

Given an integer array nums, find the maximum possible bitwise OR of a subset of nums and return the number of different non-empty subsets with the maximum bitw...

MediumSometimes
arraybacktrackingbit-manipulation

Best Time to Buy and Sell Stock with Transaction Fee

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day, and an integer fee representing a transaction fee.

MediumSometimes
arraydynamic-programminggreedy

Populating Next Right Pointers in Each Node II

Solve

Given a binary tree

MediumSometimes
linked-listtreedepth-first-search

Rank Transform of a Matrix

Solve

Given an m x n matrix, return a new matrix answer where answer[row][col] is the rank of matrix[row][col].

HardSometimes
arrayunion-findgraph

Subarray Sums Divisible by K

Solve

Given an integer array nums and an integer k, return the number of non-empty subarrays that have a sum divisible by k.

MediumSometimes
arrayhash-tableprefix-sum

Best Time to Buy and Sell Stock IV

Solve

You are given an integer array prices where prices[i] is the price of a given stock on the ith day, and an integer k.

HardSometimes
arraydynamic-programming

Bus Routes

Solve

You are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever.

HardSometimes
arrayhash-tablebreadth-first-search

Basic Calculator

Solve

Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.

HardSometimes
mathstringstack

Rotting Oranges

Solve

You are given an m x n grid where each cell can have one of three values:

MediumSometimes
arraybreadth-first-searchmatrix

Open the Lock

Solve

You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely...

MediumSometimes
arrayhash-tablestring

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:

HardSometimes
hash-tablestringbacktracking

Course Schedule II

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...

MediumSometimes
depth-first-searchbreadth-first-searchgraph

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 Citadel interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Citadel coding interview

Citadel interviews focus heavily on array, dynamic-programming, 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. Citadel 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 Citadel ask in interviews?add

Citadel has been reported to ask 88 distinct coding problems. The most common topics are array, dynamic-programming, hash-table. 4 are Easy difficulty, 56 are Medium, and 28 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Citadel coding interviews?add

Based on 88 reported problems, Citadel interviews are significantly harder than average - 32% Hard vs 18% across all companies. 64% 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 Citadel coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, dynamic-programming, 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 Citadel interview?

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

Simulate a Citadel interview with AIarrow_forward