Bloomberg LP Interview Questions
- 0of 0 votes
AnswersHow would you find a number in a dataset of unknown size?
- Anonymous December 02, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersPhone interview:
- Anonymous December 01, 2010
45 minute interview... He seemed to have some set of questions but depending on my answers he kept asking more and more. Choose your topics wisely.
Describe a class you wrote.
Have you ever used any designed patterns? If yes, explain what it does and how it is used.
-I picked singleton so he made me explain what is private and public for this class. Why do we need a private constructor?
What is factory method?
This is where "virtual constructor" came up. He asked me if we can have one of those why and why not?
What needs to happen with a base classes destructor? (I think he was trying to get virtual destructors out of me.)
why do we need a virtual destructor?
how do you list the processes on a linux system?
what is context switching?
how do 2 threads communicate/share info?
what's a virtual table?
given map, hash table and linked list, which one is the fastest for seaching?(seach complexity)
how does a hash table work?
how does map work?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
AnswersHow do you avoid dangling pointers and dangling references? Can you have a const reference to an object i.e. MyClass& const refToObj;? Does having a const* to an object guarantee safety from seg faults? What is the best alternative?
- Synonymous November 24, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP C++ - 0of 0 votes
AnswersWhat is a dangling reference? Give sample code.
- Aynonymouse November 24, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP C++ - 0of 0 votes
AnswersWhat happens when you get a segmentation fault? how do you get it and how is it implemented?
- Ultra Anonymous November 23, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Debugging - 0of 0 votes
Answers3 friends are sitting at the table and they want to know their salary’s average, but without knowing each other's exact salaries. Develop a strategy for them.
- Aynonymouse November 22, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind the most populous character in a string? Most optimal solution is desired.
- Richa Aggarwal November 12, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersFind 2 smallest numbers in an array?
- Richa Aggarwal November 12, 2010
Use of Static in C++.| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersdescription of a class that you designed.
- pippin October 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP - 0of 0 votes
Answersoperator++, op<<, copy ctor, assignment syntax,
- pippin October 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP - 0of 0 votes
AnswersDetect a cycle in a graph
- Anonymous October 24, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersIf there are 3 dots on a circle, whats the probability of 2 of them lying on the same side.
- pippin October 22, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
AnswersHow would you choose m random numbers between 1-n.
- pippin October 22, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
Answershow would you find the missing numbers in 1-1M with least possible space complexity.
- pippin October 22, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
Answerswrite code to reverse xyz___pqr___abc into
- pippin October 22, 2010
zyxrqpcba. Give the most optimal solution.| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
Answershow to find that a given string is palindrome given a string can contain space as well. we don;t need to consider space. eg: a cd ef ed ca is a palindrome.. try to reduce to more efficient alogorithm
- Sushantmax88 October 20, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
Answersinput a binary tree, check if this is a binary search tree
- Gao October 15, 2010
bool isBinarySearchTree(Node * root){
}| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Algorithm - 0of 0 votes
AnswersSwap two numbers without using temporary variable. I dont know why he asked this simple question.
- Jay Taurus October 11, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersA character array contains "I am from Chicago". There is one byte of memory which can be used as temporary variable. Now reverse the words to get "Chicago from am I". How would you do that? Is there any better data structure that can be used instead of array to do this?
- Jay Taurus October 11, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersHow would you sort a text file full of phone numbers. You do not have enough memory to load all the file contents at once and sort them. You should write back the sorted list to the file in the end.
- Akshat October 04, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersWhich one of the following function types CANNOT be overloaded?
- akshat October 03, 2010
1. The constructor function of a structure
2. The constructor function of a class
3. The destructor function of a class
4. Any constant method of a class
5. Any static method of a class”
There can be multiple answers ..| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C - 0of 0 votes
Answers1. Given the following code
- Smith September 29, 2010
class A {
X *x;
Y *y;
Z *z;
A(){
x = new X;
y = new Y;
z = new Z;
}
where X, Y & Z are some predefined classes.
if allocations fails at z = new Z; line program will crash. What will you do to prevent the crash without using try-catch.| Report Duplicate | Flag | PURGE
Bloomberg LP Developer Program Engineer - 0of 0 votes
AnswersHow will you sort 1 million numbers.
- Akshat September 27, 2010
Merge sort or quick sort.
better to use c or C++. Why.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm C C++ - 0of 0 votes
AnswerAsked me about sorting a vector of integers
- Steve August 24, 2010
I told him used std::sort
Then asked me how to sort a vector with objects of class StudentData. I told him use std::sort(ve.begin(), vec.end(), sortRoutine)
The sortRoutine will be define static or global scope in header file.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
AnswersGiven a function: func(CString str1, CString str2). You need to remove all characters in str1 that occur in str2.
- Steve August 24, 2010
Initally i gave him O(n2) solution and he asked me to give more effient one.
So i gave him another solution where str2 is hashed in a hash-map. Iterate through str1 char by char and remove (left shift) the matching chars in str1.
Still he was not happy as the above approach was O(n) + O(m). He asked whether we can do it in O(n). I could not come up with O(n).| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersHow will you protect static data?
- Steve August 24, 2010
How do you make sure that static data is protected well enough.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
AnswersExplain what you understand by static in C.
- Steve August 24, 2010
Ans. I told him about static variables, static functions. Then he asked me the difference between static class vars and static defined in header file.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C