Bloomberg Interview Question

Phone Interview: 1. Maximum sum subarray problem. Given an array of stock prices, how will you maximize your profit. 2. Convert an roman numeral to an integer. On-Site: 1. Find the longest path in a binary tree. It doesn't need to originate in the root, it could even pass through the root. 2. I don't think the interviewer understood his question himself: Imagine a singly-linked list in the shape of the number 3, with all the heads meeting and eventually pointing to null. If you're given the three heads in any other, how will you find out the lowest head? 3. I'm thinking of a number. Write a function to guess it. Complexity. 4. Differences between C++/Java. 5. Given the definition of an Iterator, define a prime iterator.