Financial Engineer Interview Questions | Glassdoor

# Financial Engineer Interview Questions

126

Financial engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Financial Applications Engineer at Bloomberg L.P. was asked...

Mar 25, 2012
 If a 3x3 white cube is painted blue on its face and then cut into 1x1 cube, what are the chances of picking a cube with a blue side from a bag5 Answers33%4/9From a 3x3x3 Cube you can make 27 1x1x1 cubes, Since one face of the cube is painted blue. once face of 9 1x1 cubes will be blue. hence the answer is 9/27 = 1/3 = 33%Show More ResponsesIs it 6/27? why is 9?P= 1/3, or 33%

### Financial Applications Engineer at Bloomberg L.P. was asked...

Jan 9, 2013
 Given a sorted sequence of 1 million numbers, write a program to find all pairs of numbers that add to 10.3 Answersx=rand(1000000,1); y=10*x; x=ceil(y); y=length(x); a=1; for z=1:y for z1=1:y if (x(z)+x(z1))== 10 r(a,1)=x(z); r(a,2)=x(z1); a=a+1; end end end MATLAB'd& if they want non repetitive numbers: [code cont'd] g=size(r); b=g(1,1)-1; c=g(1,2); q=1; for d=1:b if r(d,1)~=r(d+1,1) && r(d,2)~=r(d+1,1) l(q,1)=r(d,1); l(q,2)=r(d,2); q=q+1; end endNot really optimal. I'll give you my approach: 1) First you do binary search, to located the Last 10. 2) Create 2 pointers, 1 at the start, and the other from the last 10. 3) Bring them closer together creating a new array of all pairs summing up to 10. 4) If 1 pointer gets out of sync, save the index of that pointer (only once), and skip all same numbers till the pointers get in sync again. 5) Recurse within all the indices you skipped. 6) Return the list of pairs.

### Financial Applications Engineer at Bloomberg L.P. was asked...

Feb 22, 2012
 My clock is 9 minutes slow every hour. At noon, it tells the correct time. After how many hours will it again tell the correct time?3 Answers80 hours.Let us suppose that we have 2 different clocks with the faulty one completing 51 mins in an hour. -the two clocks will again show the same time when the lag time = 12 hours for 1 iteration=>lag time =9 mins for getting a lag time of 12 hours no of iterations needed = 12*60/9=80 one iteration means 1 hour so the next time the clocks will be in sync= 80 hours time at that point=8:00 PMif it is analog it takes 40 hours (6 hours late, and 6 hours passed) if it is digital 80 hours.

### Financial Applications Engineer at Bloomberg L.P. was asked...

Jul 1, 2009
 (Programming Language Test) When casting an object of a polymorphic class from a base class, which kind of cast executes only if it's is valid?3 Answerschoices were a number of different kinds of casts - dynamic, static, reinterpret, etc.You should use dynamic cast. It returns a null pointer if it's not valid. Reinterpret will give you a bad pointer since the cast will be pointing to the wrong part of the polymorphic object.Also, it's important to note the difference between using pointers vs references in the case of casts. In C++, if you use a pointer in a dynamic_cast() and it fails, the result is a null pointer. However, since you cannot have a null reference, dynamic casts need to be wrapped in try/catch blocks.

### Financial Applications Engineer at Bloomberg L.P. was asked...

Aug 20, 2012
 Some problems were quite difficult for this position. Maybe the interviewers didn't like me personally. Check if two linked list intersect, if so, find the intersection point. Travelling salesman problem. 2 AnswersI think the followings are pseudo enough...... --------------------------------------------------------------------------- a = length of ll1, b = length of ll2, c = abs(a-b); do -> ;traverse (longerlist = a > b ? a : b) by c times end do do -> ;traverse (a AND b) in parallel node after node ;if the node at both a and b are the same address -> return this node@Dekus What do you mean by traverse and in parallel? If you do it in parallel, (i++, j++ equivalent) you are making the assumption that the lists are aligned, and the intersection happens at the same place in both of them. Also, the first portion does not make sense. Consider the case wherethey are singly linked lists and two nodes point to 1. My suggestion: traverse a list, and map (hashtable) the addresses of the next pointers to a boolean. then go through the other list and check to see if any next pointers are in the hashtable. This would be time: O(N + M) and space: O(N)

### Financial Software Engineer at Bloomberg L.P. was asked...

Sep 30, 2011
 How to avoid having instances of your class created on the stack2 AnswersFirst Guess: Declare a private constructor, this should prevent the compiler from allowing it to be called during stack initialization (It should give a compile warning about an unavailable member). Of course, it can't be easily initialized on the heap either, so you'll have to provide a comparable member function (getInstance () or some such).Ryan you are going way too overboard with constructors. Declare static\global, or declare dynamically on the heap (new , malloc). That's it.

### Financial Applications Engineer at Bloomberg L.P. was asked...

Jun 5, 2009
 Count the number of time the letter "l", upper and lower case, appears in a given paragraph.2 AnswersYou simply count the number "l"s in the paragraph.i would say the same thing, or there is a better way to solve this problem?

### Financial Software Engineer at Bloomberg L.P. was asked...

Sep 12, 2011
 A robot can move only left and down in nXn matrix. Have to get to the bottom right corner of matrix. Write algorithm to find the maximum number paths it can take.4 AnswersWorked on this for 2o mins. They were patiently waiting.static void NumofPaths(int n) { int[][] array = new int[n][n]; for (int i = 0; i < n; i++) { array[0][i] = 1; array[i][0] = 1; } for (int i = 1; i < n; i++) { for (int j = i; j < n; j++) { array[i][j] = array[i-1][j] + array[i][j-1]; array[j][i] = array[j-1][i] + array[j][i-1]; } } System.out.println(array[n - 1][n - 1]); }https://www.khanacademy.org/math/recreational-math/brain-teasers/v/path-counting-brain-teaser - video http://math.stackexchange.com/questions/104032/finding-points-in-a-grid-with-exactly-k-paths-to-them - code.Show More ResponsesI think you mean the robot can only go right and down since the robot starts at the top left. Since the robot must make n-1 right moves and n-1 down moves to reach the bottom right field, Define S to be the bit string of length 2*(n-1) for which 1's are right moves and 0's are left moves that get the robot to the bottom right. Then, there are (2*(n-1))!/((n-1)!)^2 distinguishable permutations of the bit string and so the same number of possible paths to the bottom right.

### Financial Software Engineer at Bloomberg L.P. was asked...

Nov 3, 2011
 You're given a set of strings. You want to test if any two strings in the set are anagrams.2 AnswersI gave a solution that involved sorting the strings and using that as elements of a new set to check for anagrams. They asked me to reduce the memory footprint of my solution without sacrificing the O(N) time (N = number of strings, we assumed that string lengths were O(1)). I suggested that if the strings represent words in a natural language, we might be able to apply the same Huffman encoding to everything in the set, which maybe could reduce space by, say, 50%. They seemed satisfied with that solution.You could also check to see if the words have the same number of characters and same characters using a hash map. Only anagrams can satisfy that.

### Financial Engineering Internship at Duff & Phelps was asked...

Feb 25, 2012
 How many simulations would it take to get an accuracy of less than or equal to 1%2 AnswersUse the 1/sqrt(N)Does it not depend on the variance of the Monte Carlo estimates. The standard error does scale with 1/sqrt(n) but also depends on the variance of the algorithm simulations. The number of simulations can be lowered using variance reduction techniques such as antithetic, control variante, etc.
110 of 126 Interview Questions