Financial Software Developer Interview Questions
- 0of 0 votes
AnswersGiven a string find biggest palindrome substring. For example for given string "AABCDCBA" output should be "ABCDCBA" and for given string "DEFABCBAYT" output should be "ABCBA".
- Preeti May 24, 2016 in United Kingdom| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersA client wants to build a software phone book that contains everyone in the world (7 billion people). Every person has only the first name and the name is unique. What data structure would you use to store the data?
- rv July 14, 2015 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm Data Structures - 0of 0 votes
AnswersGiven a MxN grid, like :
111 111 111 or 001 111 001
Write a function to return all possible paths from start (0,0) to destination (M-1,N-1). Allowed moves: right, down, and diagonal down. Value 1 indicates moves is possible, 0 indicates move not possible.
- rv July 14, 2015 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersGiven a BST write a function that looks for a value.
- rv July 14, 2015 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm C++ Data Structures - 2of 2 votes
AnswersFind first unique number in an unsorted array of 32 bit numbers without using hash tables or array of counters.
- xejgomi February 16, 2014 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersThere is a large data file with 10 digit numbers. You are allowed to use only 20 megabytes of memory. How would you sort them ?
- xejgomi February 16, 2014 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersFind the longest repeating character in a sorted string
- xejgomi February 16, 2014 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 1of 1 vote
AnswersImplement the queue using stack
- kalungedamaji1137 February 09, 2014 in India| Report Duplicate | Flag | PURGE
Oracle Financial Software Developer Algorithm - 1of 1 vote
AnswersImplement the stack using queue
- kalungedamaji1137 February 09, 2014 in India| Report Duplicate | Flag | PURGE
Oracle Financial Software Developer Algorithm - 5of 5 votes
AnswersGiven an integer N, print numbers from 1 to N in lexicographic order.
Details: To be implemented without using character conversion (or Strings).
Example:
N = 25
Print:
1
10
11
..
19
2
20
21
..
25
3
4
5
6
7
8
9
A simple solution using Strings (may not be acceptable):
- Abhi October 04, 2013 in United StatesSystem.out.print("\n\tLexicographic Order\n\nEnter an integer: "); Scanner input = new Scanner(System.in); Integer n = input.nextInt(); List<String> list = new ArrayList<String>(); for (int i = 1;i<n;i++){ list.add(""+i); } Collections.sort(list); for (String j: list){ System.out.println(j); }
| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 4of 4 votes
AnswersGiven a set of N points with x,y cords in a 2D plane. Find all possible squares that can be formed with vertices in this set.
- tryingtosolvemystery August 06, 2013 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Financial Software Developer - 0of 0 votes
AnswersHow would you weigh an aeroplane
- tryingtosolvemystery August 06, 2013 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Financial Software Developer Brain Teasers - 1of 5 votes
AnswersThis was the question of two buckets of 3 and 5 litres each. Now measure four litre. I had given 2 solutions but still he wanted 3 solution.
- Nikhil June 11, 2013 in United States for any
1st soln: fill 3 litre and then interchange in various ways to get 4 litre.
2nd soln: fill 5 litre and then interchange in various ways.
do you have any soln other than this.| Report Duplicate | Flag | PURGE
Samsung Developer Program Engineer Financial Software Developer Brain Teasers - 1of 1 vote
AnswersDesign a LRU cache in Java.
- cCAACc April 20, 2013 in United States| Report Duplicate | Flag | PURGE
Citigroup Financial Software Developer - 0of 0 votes
AnswerWrite a code in java to design connection pool. You have to pass the parameter like pool size, time out etc.
- cCAACc April 20, 2013 in United States
How will you call the connection from pool?Write the code in Java?
How will you return the connection to pool once time out or connection not in use. You also have to write the exception handling mechanism to print any exception.| Report Duplicate | Flag | PURGE
Citigroup Financial Software Developer Java - 1of 1 vote
AnswersWrite a SQL to find the nth maximum salary in a employee table.
- cCAACc April 20, 2013 in United States| Report Duplicate | Flag | PURGE
Citigroup Financial Software Developer SQL - 2of 2 votes
AnswersYou have a very very big text file.How would you read & process it to print the below output.
- cCAACc April 20, 2013 in United States
1. Print the top ten ranked distinct words.
2. Print the occurrence of the each alphabet in this file.
For example:
ABC (100)
XYZ (40)
PQR (10)
THE (200)
IN (200)
Then I have to display the output as
IN (200)
THE (200)
ABC (100)
XYZ (40).
And
A=1000
B=2000
C= 300
.. ...
z=300| Report Duplicate | Flag | PURGE
Citigroup Financial Software Developer String Manipulation - 9of 9 votes
AnswersQ: If you have all the companies that are traded, and live inputs are coming of which company is being traded and what is the volume, how do you maintain the data, so that you can carry out operation of giving the top 10 most traded companies by volume of shares most efficiently.
- Aditya April 14, 2013 in United States
A: I juggled between Hash Map and Max Heap. I said Max Heap, since I can take out top 10 companies in a jiffy with a Max Heap. But then he asked you will need to find a company everytime there is a trade, which will take quite some time in Heap. He pointed out that in real world scenario, number of trades happening, and hence searching of the company and updating it, will be many times more than finding top 10. Which bought me to HashMap. Updations can happen in Real time, while finding top 10 can be done in O(n) or O(nlog(n)) time.
Even that wasn't optimal obviously. The interviewer was very nice and friendly type guy. He stressed that at every trade, at most, only 1 company will change in my top 10. This hit me and got me to the correct answer that we keep all actual data in HashMap, but also maintain a MinHeap of 10 most traded company.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Data Structures - 2of 2 votes
AnswersQ: If I give you a new book, and ask you to create the index which is found at the end of the book, how will you do it.
- Aditya April 14, 2013 in United States
A: I said for constant addition time of words (and page numbers) in the data structure, we can use Hashmap or TRIE. But since output has to be in alphabetic order, we will use a Trie DS, where at the end of each word, we simple store a list of page numbers.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Data Structures - 2of 2 votes
AnswersQ: The New operator...how does it work, what are the steps?
- Aditya April 14, 2013 in United States
A: I just said it creates a new memory in the heap and the reference points to it. He seemed satisfied.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Java - 1of 1 vote
AnswersQ: Do you know what is a Binary tree? How would you go about coding for addition of a new element to Binary tree?
- Aditya April 14, 2013 in United States
A: I asked if they want a Binary Tree or a BST? When he said BST I just said we can have a recursive function in which we pass the root of the tree and see if the value to be added is smaller or bigger than the root, and depending on result, we go to left or right of the tree, assuming the left (or right) is not null. If null, just use new to create a memory location, put the value, and use the left reference of the root to link to this new memory. Simple basic stuff.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Coding - 3of 3 votes
AnswersQ: Do you know what is a stack? Explain
- Aditya April 14, 2013 in United States
A: Yes, explained LIFO push pop peek
Q: In stack, Push and Pop are constant. What will you do if you want an operation which gives the min of the stack also in constant time?
A: Question is straight out of Gayle's Book. You just maintain a new stack of minimum number till that point.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Stacks - 0of 0 votes
Answers3 Baskets, with label Apple Orange and Mixed. All the lables are incorrect. Pick up one fruit from one of the 3 baskets and find the correct labels for these 3 baskets.
- cronaldo March 28, 2013 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersHow to find a missing value in an size N unsorted array (value from 0 to N but missing one of them).
- cronaldo March 28, 2013 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersDifference between C++ and Java
- cronaldo March 28, 2013 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 5of 5 votes
AnswerQ .2 candles each burns for 1 hr each ,calculate 45 min time
- dearamitdubey@googlemail.com March 25, 2013 in India
by burning them in one go .
Ans :
burn the first candle from both the side, parallel to first one , burn the other from single side only, once the first is burnt completely 30 mins are over and second is already half burned .
now start burning the second one from the other side .
you have 45 mins calculated.
!!! Bam !! again kid stuff !!| Report Duplicate | Flag | PURGE
Samsung Financial Software Developer - 0of 0 votes
AnswersAssume you daily prices of a stock
- hizzle March 10, 2013 in United States
3 7 4 10 11 8 5 4 8 yadda yadda
You can only buy 1 share or sell 1 share a day, but you can only sell if you own the stock. You can't hold more than 1 share. write me an algo that finds me the strategy that has the highest pay off.
Don't want the generate all possible strategies and compare.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
Answersvoid populate(char **s); int main() { char *s; populate(&s); printf("%s", s); // should print "Prasad" free(s); return 0; } void populate(char **str) { // 1. The next two lines is one implementation *str = (char *)malloc(sizeof(char) * 7); strcpy(*str, "Prasad"); // 2. This line seperately is another implementation *str = "Prasad"; }
What is wrong, if anything, with the two implementations of populate.
- prasad_usc February 09, 2013 in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C - 0of 0 votes
AnswersWhat are uses of Btree, AVL and RBtree(individual applications as i explained that we use them whenever we need balanced BST and he wasnt convinced)
- vik February 09, 2013 in United States
When would you specifically use Btree over AVL tree.
Which one out of balanced BST is most efficient(for which i answered Btree for large values of n) and he asked why dont we always use Btree then?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Data Structures - 3of 3 votes
AnswersDesign a phonebook dictionary which on input any characters gives names and phone number of all the matching names(prefix)
- vik February 08, 2013 in United States
For instance
Rihana 233222232
Ricky 134242444
Peter 224323423
Ron 988232323
If you give R as input it should list
Rihana Ricky and Ron which their contact numbers
If you give ri as input it should list
Rihana, Ricky which their contact numbers| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm Data Structures