Ten days ago, I completed the HackerRank online assessment for the Citadel SWE role. While it’s still fresh in my mind, I want to share the OA questions I received. I also organized some OA questions from other roles, which I’ll include as well to provide a more complete perspective in this article.
The format of the OA varies depending on the role. In my case, I had to solve two coding problems. Other roles may involve multiple-choice or fill-in-the-blank questions, often covering math, probability, and related topics.
The difficulty of Citadel’s HackerRank assessments generally ranges from medium to hard. The questions I encountered were LeetCode-style problems.
For my OA, I was given 75 minutes to complete the assessment. Typical time limits for other roles are: SDE – 75 minutes, Quant Trading – 30 minutes, and Quant Research – 80 minutes.
I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire interview experience here. Having an invisible AI assistant during the interview is indeed very convenient. It can take a screenshot of a problem and have AI analyze the solution. Plus, it's not detectable by HackerRank or by the interviewer.
Problem 1: Palindrome Password Transformation
You are given a password represented as a string of lowercase letters. Your task is to transform it into a new password of the same length that satisfies two conditions:
The new password must be a palindrome.
Every k-th character must be identical (i.e., positions separated by k share the same character).
Return the minimum number of character changes required to make the original password valid.
Input:
A string s (1 ≤ |s| ≤ 10^5), consisting of lowercase English letters.
An integer k (1 ≤ k ≤ |s|).
Output:
An integer representing the minimum number of changes required.
Example:
Input:
s = "abcda"
k = 2
Output:
2
Explanation:
- To make it a palindrome, positions (0,4) and (1,3) must match.
- To satisfy the k=2 condition, positions (0,2,4) must be identical and (1,3) must be identical.
Minimum 2 changes are required.
Problem 2: Process Scheduling Without Consecutive Repeats
You are given n processes that need to be assigned to n_intervals time slots. At each time slot, exactly one process must be scheduled. The same process cannot be assigned to two consecutive time slots.
Return the total number of valid scheduling arrangements.
Input:
Two integers n (1 ≤ n ≤ 20) and n_intervals (1 ≤ n_intervals ≤ 50).
Output:
An integer representing the number of valid scheduling arrangements.
Example 1:
Input:
n = 2
n_intervals = 3
Output:
6
Explanation:
There are 2 processes (A, B).
Valid schedules of length 3: ABA, BAB, ABB, BAA, AAB, BBA → total 6.
Example 2:
Input:
n = 3
n_intervals = 2
Output:
6
Explanation:
Three processes (A, B, C).
Schedules of length 2 without consecutive repetition: AB, AC, BA, BC, CA, CB → total 6.
Frog jump from Ground to Rock to Grass, Ground to Rock p success = 1/3, Rock to Grass success p = 1/4. ev[num of jumps to escape]
Two teams play Tournament until one team has won 3 total games (Best of 5). Ev[num of games played]?
10 Socks, 5 Red 5 White, p(make two pairs after drawing 4)
4 Ppl Red Hair, 8 Ppl Black Hair, ev[num of adjacent pairs of ppl w same color hair]?
Red and Blue Buses. Red late 3/4 time, Blue late 1/3 time, a person gets on bus randomly and is late. If p(rode Red Bus) = 1/2, what is ratio of Red to Blue Buses?
Three Tourists visit one of three Islands, chosen independently and randomly. Expected median of number of tourists across three Islands?
Neighborhood of 25 Ppl, all take a walk w mean of 80 minutes, std of 10 minutes. std of entire Neighborhood’s walk?
Problem: Implementing an Efficient Order Book Matching Engine
You have 45 minutes to implement the core functionality of a simplified order book. The system must efficiently receive and process buy and sell orders.
Your task is to design and implement a data structure to store and manage pending buy orders (Bids) and sell orders (Asks). Specifically, you need to:
Data Structure Design
Use a max-heap to store all buy orders. This heap should be prioritized by order price, ensuring you can quickly access the highest-priced bid.
Use a min-heap to store all sell orders. This heap should also be prioritized by price, ensuring you can quickly access the lowest-priced ask.
Matching Logic
When a new order (either a buy or sell) enters the system, you must check if it can be matched with existing orders in the order book.
Buy Order Matching: If the new buy order's price is greater than or equal to the lowest-priced sell order in the book, a trade occurs.
Sell Order Matching: If the new sell order's price is less than or equal to the highest-priced buy order in the book, a trade occurs.
After a trade, you must remove the matched orders from the heaps and process any remaining quantities.
Functionality
Write a central function to handle new orders. It should accept the order type, price, and quantity as input.
The function should return the total trade volume and the state of the order book after the trade (i.e., the best bid and ask prices).
Citadel's HackerRank interviews are time-constrained assessments focused on evaluating candidates' capabilities, with the test format and duration varying significantly by role. They aim to assess problem-solving skills, relevant technical knowledge, code efficiency (where applicable), accuracy, and performance under time pressure. Below are the revised interview preparation strategies and tips:
Duration & Focus for 75-Minute Assessments: Typically designed for software-focused roles (e.g., SWE/Software Engineer, SDE/Software Development Engineer). These interviews usually include 2-3 algorithmic questions, with difficulty equivalent to medium to hard on LeetCode. Common question categories cover array and string manipulation, hash tables and frequency counters, graphs and trees, dynamic programming, and greedy algorithms.
Duration & Focus for 30-Minute Assessments: Often used for quantitative-focused roles (e.g., Quant Trader, Quant Research). These assessments prioritize probability, mathematical reasoning, and financial mathematics questions over pure algorithmic ones, aligning with the analytical needs of quantitative positions.
Use platforms such as LeetCode, HackerRank, and Codeforces for targeted practice. For software-focused roles, start with LeetCode's "Top Interview Questions", participate in timed contests, and focus on questions tagged with arrays, hash tables, greedy algorithms, and graphs. For quantitative-focused roles, practice probability, statistical analysis, and financial mathematics problems relevant to the field.
Simulate the actual interview environment by setting a role-matched timer: 30 minutes for quantitative-focused roles and 75 minutes for software-focused roles.
Citadel places significant emphasis on time complexity for software-focused roles. Brute-force solutions, even if correct, are often rejected. When practicing algorithmic questions, always analyze the time and space complexity of your solutions. Strive to optimize your code to O(n) or O(log n) time complexity, and avoid unnecessary nested loops or unbounded recursion.
The HackerRank platform has a unique interface and operation methods. Familiarize yourself with its features in advance, such as code submission and test case execution. This prevents wasting time or making operational mistakes during the interview due to unfamiliarity with the platform.
For software-focused roles, solid logical reasoning supports algorithm design; for quantitative-focused roles, proficiency in mathematics (e.g., probability, linear algebra) and financial mathematics is critical. Regardless of your target role, regularly practice exercises to strengthen these skills, as they are core to performing well in Citadel's HackerRank assessments.
No. Citadel’s HackerRank assessment is conducted in a closed-book format, and access to any external materials is prohibited. You must master the syntax of your target programming language and common library functions (e.g., Python’s NumPy, basic data structure methods for algorithm questions) in advance.
Python is mainly supported, with C++ allowed for some roles. Python is the top choice for most candidates due to the convenience of its data processing libraries. It is recommended to confirm the language restrictions for your target role in advance.
A timeout directly results in a failure for that question, and no additional time will be granted for fixes. When answering questions, you should first evaluate the time complexity of your approach—prioritize solutions that can be implemented quickly and meet efficiency requirements, rather than overpursuing the optimal solution.