Quantitative strategist Interview Questions
47
Quantitative Strategist interview questions shared by candidates
Insert a new data point at the head of a singly linked circular list in constant time. Given a pointer to the current head of the circular list.
3 Answers↳
Insert the new element after the current head, and then swap the new value with the current head. Less
↳
For a singly linked circular list, assuming you have a pointer to the tail of the list (rather than the head) to make insertion at head and tail constant time, here's how to insert at the beginning (head) in constant time: temp = Node(val2BeInserted) temp.setNext(self.tail.getNext()) self.tail = temp (given the classes Node and SinglyLinkedCircularList) with (value,next=None) and (tail) attributes, respectively. Less
↳
For a singly linked circular list, assuming you have a pointer to the tail of the list (rather than the head) to make insertion at head and tail constant time, here's how to insert at the beginning (head) in constant time: temp = Node(val2BeInserted) temp.setNext(self.tail.getNext()) self.tail = temp (given the classes Node and SinglyLinkedCircularList) with (value,next=None) and (tail) attributes, respectively. Less

Suppose you have a one-dimensional array A with length n that contains both positive and negative numbers. Design an algorithm to find the maximum sum of any contiguous subarray.
1 Answers↳
Make two arrays: accumulated sum and maximum sum. Start from index 0 and move to end. maximum sum would be max of accumulated sum till current position. Refresh accumulated sum once its smaller than the current number. Less

Given a stick that is randombly broken in 2 places, what is the probability that the pieces can form a triangle?
1 Answers↳
The (formal) solution lies in the distribution of order statistics for a sample of 2 from the standard uniform. It is not too hard to show that the solution is 1-P(Max 1/2)-P(Range>1/2), and with a combinatorics/conditional probability argument, it is equivalent to 1-3*P(Max <1/2). P(Max< 1/2) = 1/4, so the probability of that the pieces can form a triangle is 1/4. Less



basic math, programming skills, problem solving, and mathematical finance
1 Answers↳
I wasn't prepared

20 points are randomly distributed on a circle. You pick 2 pairs of points at random, what is the probability for the two lines connecting each pair to intersect
1 Answers↳
The locations of the 4 picked points on the circle don't matter, you will always have three possibilities to divide them into two pairs, of which one yields intersecting lines. Therefore, no matter if you distribute 20 or 10000 points on the circle, the probability of intersecting lines of two pairs will always be 1/3 Less

Return the integer that corresponds to the minimum number of steps required to change X to a Fibonacci number.
1 Answers↳
What is the step size?