Citadel OA Questions
Anonymous User
13456

My Experience with the Citadel Online Assessment for Summer 2025 Software Developer

As someone who has gained immense knowledge and skill from LeetCode, I wanted to share my recent experience with the Citadel online assessment. Today, I had the opportunity to take the assessment for the Summer 2025 Software Developer position. The test consisted of two challenging questions hosted on HackerRank. Levelwise it seemed medium from leetcode.

Question 1: Subarray with a Specific Property

Problem Statement:
Given an array of length (10^5), we had to find the number of subarrays that satisfied the condition:
arr[i] == arr[j] == sum(arr[i+1 : j-1])
where (i) and (j) are indices of the array.

To solve this problem, I used a prefix array combined with hashing.

Question 2: Minimum Operations to Reduce Array Elements to Zero

Problem Statement:
Given an array and two integers (x) and (y), in one operation, we can pick one element and subtract (x) from it, and subtract (y) from all other elements. The goal is to determine the minimum number of operations needed to reduce all elements of the array to zero.

Approach: I employed a binary search approach to find the minimum number of operations efficiently.
Time Complexity: O(NlogN)

Comments (10)