Bloomberg LP Interview Questions
- 0of 0 votes
AnswersI was asked a question to get all the numbers from a file with a number per line.
- thefourthmusketeer May 27, 2010
I used streams and stored them in a vector.
However he told me that using a vector wastes space. How do you optimise . I told him I would use a linked list.
But he said he wanted to use a vector construct.| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
AnswersWrite a function which takes x as a parameter and prints f(x)given that
- thefourthmusketeer May 27, 2010
f(0)=1;
f(1)=0;
f(x+2)=F(x)-f(x-1);
I wrote both the iterative and recursive versions.
the interviewer then modified the question
In the recursive version, print all the numbers in the series till the input parameter| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersFind out the first non duplicate character in a string.
- thefourthmusketeer May 27, 2010
eg: "nasa" output: 'n'
I have given a solution using hashmap.
Its o[n]+ o[n] performance. ( constructing hashmap + traversing the string )
He wanted solution with just o[n] which I was not able to write there.| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou have experience in telecom domain. Why do you want to work in Bloomberg?
- Anonymous April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Behavioral - 0of 0 votes
Answerswhat will be size of class and size of object of class.
- Keyur April 25, 2010
class A{
int *p;
static int a; }| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersexception handling. can we throw different type of object in re throw ?
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 1of 1 vote
Answersin singleton class how will delete the obj ?
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ Object Oriented Design - 0of 0 votes
Answerswhat happens if I throw exception from destructor. can I throw exception from construtor and destructor ?
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersin unix one task/process is stuck. How will debug it ?
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Testing C++ - 0of 0 votes
Answersis template class compilation static or dynamic binding ?
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersthere is template class with syntax errors and in main prog there is nothing.
- Keyur April 25, 2010
will it throw compile errors ?| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answerswhen you will provide overloaded new operator. give example
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answerswhen you will provide your own copy constructor, assignment operator. give example.
- Keyur April 25, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersExplain the different types of polymorphism in C++
- Anonymous April 22, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answershow will you write constructor such that if will deallocates memory when there is exception.
- Keyur April 21, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersexception handling. can we throw different type of object in re throw ?
- Keyur April 21, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answerswhat happens if I throw exception from destructor. can I throw exception from construtor and destructor ?
- Keyur April 21, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersis template class compilation static or dynamic binding ?
- Keyur April 21, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersthere is template class with syntax errors and in main prog there is nothing.
- Keyur April 21, 2010
will it throw compile errors ?| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersdifferent between exec and fork. will parent process and child process
- Keyur April 20, 2010
in deadlock if parent is using resource and child will also get same resource ?
what if parent contains two threads ? will child also get 2 threads ? how fork will be thread safe ?| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Threads C++ - 1of 1 vote
AnswersThree boxes, one with apples, one with oranges, one with a mix of apples and oranges.
- Anonymous April 19, 2010
all the boxes are labeled incorrectly.
you can pick up just one fruit.
and tell which box has what fruit.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Brain Teasers - 0of 0 votes
AnswersWhat's the three types of memory allocated for C++ variables?
- ttgg April 13, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answerswhere is global variable (defined outside any function or class) allocated, heap or stack?
- ttgg April 13, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersyou have a class A, where you set ctor to be private, so a client can't call
- ttgg April 13, 2010
"A a;"
to create obj on stack.
But someday another developer add a new ctor:
"A(int)"
and try to call "A a(1);" inside main(). So this will create a obj on stack. How do you prevent that?| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersYou have a string which stores a number with commas. For example, a string that has the number 345,000,000. How will you manipulate this string in-place [without using any extra memory] so that the output is the original string without any commas in O(n) ?
- Bandicoot April 02, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm Arrays C Coding String Manipulation - 0of 0 votes
AnswersHow will you find out if a stack grows up or down in a system ? More importantly, which is better: a system in which the stack grows up or one in which a stack grows down ?
- Bandicoot April 02, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Operating System - 0of 0 votes
AnswersMemory Resize Function
- Keyur March 31, 2010
Lets say contiguous memory is not available for vector's elements and it is occupied by something else. How does the resize function of vector allocate memory to be contiguous allocation?| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersvector and list difference. complexities of alogrithms.
- Keyur March 31, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answershow to prevent deadlock.
- Keyur March 31, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Threads