Citadel

Software Engineer Intern

OAFresherOtherRemoteFeb 2026

8 Questions

01

Tom is a software engineer at a very large financial services firm. One Thursday the firm tasks him with adding functionality to thousands of in-house library functions. Specifically, they would like him to add the ability to print run times for any given function call for firm-wide use. However, neither Tom nor the firm have much time to get this done - Tom is already busy with another large infrastructure project and the firm needs this rolled out within the next 24 hours in time for the weekly Friday release. Given the above constraints, which of the following is the BEST way for Tom to approach this problem? A. Modify each function of interest to record time before and after execution B. Create an external logging library to interface with functions C. Use a modern Integrated Development Environment (IDE) with function execution profiling D. Implement a function decorator E. Use the ‘timedelta64()’ method from the numpy library

02

A Python class 'Country' has an attribute 'GDP' and a method 'printGDP()'. Let 'USA' be an instance of 'Country'. The call 'USA.printGDP()' returns the following error: "printGDP() takes 0 positional arguments but 1 was given" Which of the following describes the MOST likely cause of this error? A. The attribute 'GDP' was not initialized B. The attribute 'GDP' is private C. The attribute 'GDP' was not declared D. The definition of 'printGDP()' did not specify 'self' as one of the parameters E. The definition of 'printGDP()' did not specify 'GDP' as one of the parameters

03

Lions and buffalos are mammals. Lions eat by hunting and buffalos eat by grazing. Based on these two statements, and provided that one is to abide by the prescriptions of object-oriented programming, which of the following is LEAST LIKELY to be good coding practice? A. The Lion class and the Buffalo class should be derived from the Mammal class B. It is superfluous to have an Eat() method at the parent class level since it remains undefined unless associated with a particular mammal species C. Polymorphism implies that the Eat() method could be defined for the Mammal class, even if it manifests itself differently for instances of Lion or Buffalo D. Both the Lion class and the Buffalo class should inherit their common attributes and methods from the Mammal class E. Since mammals may have different ways of feeding themselves, the Eat() method in the Mammal class should be a virtual function

04

Alice and Bob decide to play a card game where N cards are dealt face-up in a long row, with N an even number. Each card has a different number of points written on it. Alice and Bob then take turns removing either the leftmost or rightmost card from the row, until all the cards are gone. The player who has collected the most points wins. The BEST reflection of the order of magnitude of the time complexity required to determine the optimal strategy for either player can be expressed in the form O(N^A (log N)^B), where A, B are real numbers. Compute 10A + B.

05

Suppose we have N real numbers x1, x2, ..., xN. There exists an index J, 1 ≤ J ≤ N, such that: x1 to xJ are in ascending order xJ+1 to xN are in ascending order Also, x1 > xN. What is the time complexity required to determine if some given real number M is among the xi? A. O(log log N) B. O(log N) C. O(log N log log N) D. O(sqrt N) E. None of the above

06

What is the smallest integer value of d such that the time complexity of calculating the determinant of a general N × N matrix is at most O(N^d)? Assume that we are using the row-reduction algorithm to calculate the determinant.

07

You are tasked with developing a program to manage online customer pre-orders for a smartphone series. The system must support: - Customer places a new pre-order - Customer removes a previously placed pre-order - Orders are serviced in first-come, first-serve order Which of the following pairs of data structures would be MOST suitable for optimizing run-time? A. Linked list / Stack B. Linked list / Dictionary C. Queue / Binary search tree D. Dictionary / B-tree

08

You are implementing a function random_insert() which: - Randomly selects a position in the middle of a container - Inserts 1000 values consecutively starting from that position Which data structure is most efficient? A. Queue B. Array C. Hash map D. Linked list E. Stack

Divyansh Garg·Mar 2026

Share yours