Bloomberg LP Interview Questions
- 0of 0 votes
Answerschar ch1 = 0,ch2 = 0; try { ch1 = (char) System.in.read(); } catch(Exception e) {} switch(ch1) { case 'a': ch2 = '1'; case 'b': ch2 = '2'; case 'c': ch2 = '3'; default: ch2 = '4'; }
In reference to the above, if during execution the user presses "b," what is the ending value of "ch2"?
- dhaval0129 July 26, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Java - 0of 0 votes
Answerspublic class SaveObject{
- dhaval0129 July 26, 2011
public static void main( String[] args ){
Employee smith = new Employee("012345","Smith","James","Payroll");
FileOutputStream fos = new FileOutputStream("smith.dat");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(smith);
fos.close();
}
}
Given the above sample code, which one of the following prevents the code from working properly?| Report Duplicate | Flag | PURGE
Bloomberg LP Algorithm - -1of 1 vote
Answerspublic class SortSample {
- dhaval0129 July 26, 2011
public void printSorted(int arrayToSort[]) {
.. // Insert code to sort the array here
System.out.print("Sorted array is ");
for (int j=0; j<arrayToSort.length;j++)
System.out.print(arrayToSort[j]+" ");
System.out.println();
}
In the above code, what is the code-efficient way to sort the array into ascending order?| Report Duplicate | Flag | PURGE
Bloomberg LP Java - -1of 1 vote
Answerspublic class CashHolder {
- dhaval0129 July 26, 2011
private double amountHeld=0.0;
}
public void getCash() {
CashHolder wallet = new CashHolder();
// Lookup the Teller using RMI
Teller teller= (Teller) java.rmi.
Naming.lookup("//localhost/TellerObject");
// Withdraw 100.00 from account #9856432 and put it into
// Wallet.
teller.withdrawFunds("9856432",wallet,100.00);
// Go somewhere and spend it
..
}
How do you change the code above to allow teller.withdrawFunds() to update the CashHolder object passed to it?| Report Duplicate | Flag | PURGE
Bloomberg LP Java - 0of 0 votes
AnswersWrite a unit test for the fibonacci function above?
- dhaval0129 July 26, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Testing - 0of 0 votes
AnswersA)
- dhaval0129 July 26, 2011
long fib_A(unsigned long n) {
if (n <= 1) {
return n;
} else {
return fib_A(n-1) + fib_A(n-2);
}
}
B)
long fib_B(unsigned long n) {
int previous = -1;
int result = 1;
for (int i = 0; i <= n; i++)
{
int sum = result + previous;
previous = result;
result = sum;
}
return result;
What is the execution time (in Big O notation)| Report Duplicate | Flag | PURGE
Bloomberg LP Algorithm - 0of 0 votes
AnswersA)
- dhaval0129 July 26, 2011
long fib_A(unsigned long n) {
if (n <= 1) {
return n;
} else {
return fib_A(n-1) + fib_A(n-2);
}
}
B)
long fib_B(unsigned long n) {
int previous = -1;
int result = 1;
for (int i = 0; i <= n; i++)
{
int sum = result + previous;
previous = result;
result = sum;
}
return res
Which is more CPU Intensive?| Report Duplicate | Flag | PURGE
Bloomberg LP Algorithm - 0of 0 votes
AnswerIn mapreduce, which type of join is more efficient, map side join or reduce side join and why?
- dhaval0129 July 26, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Database - 0of 0 votes
AnswersWrite in your most comfortable language) code that prints the numbers from 1 to 1 million.
- dhaval0129 July 26, 2011
But for multiples of prime number seven print "Multi" instead of the number and
for the multiples of prime number thirteen print "Attribution".
For numbers which are multiples of both three and five print "Multi-Attribution".| Report Duplicate | Flag | PURGE
Bloomberg LP - 0of 0 votes
Answersint x=10;
- Anonymous July 17, 2011
x++++;
print x;
what is the result?| Report Duplicate | Flag | PURGE
Bloomberg LP C - 0of 0 votes
AnswersDrawbacks of using mutexes in threads.
- Anonymous July 17, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Threads - 0of 0 votes
Answers4 people need to cross a bridge.
- Buzzkirk May 09, 2011
Person a = 1 min
Person b = 2 min
Person c = 5 min
Person d = 10 min
They have 1 flashlight and need to cross a bridge in the least amount of time. They can only move in pairs.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Brain Teasers - 0of 0 votes
AnswersStatic v/s dynamic variables
- Buzzkirk May 09, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
Answerswhat is the difference between
- Anonymous May 05, 2011T *o = new T and T *o = new T()
| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 1of 1 vote
AnswersI applied for the Pricing Quant Internship in Bloomberg and gave the Online Assessment test. I prepared for the Finance and C++ questions but to my very surprise they were all analytical for which I never prepared. Guys if you have applied for the same position please do CAT questions and Reading comprehension.
- Shekhar Agrawal April 15, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersHad been called on-site at New York, there were 3 interviews - 1st one with 2 technical people, 2nd one with a team lead and 3rd one was HR.
- Anonymous April 02, 2011
I the 1st interview, first few questions related to my resume, thesis.
Then they asked me about network time protocol, inter-process communication, few other OS concepts, various run-time errors and examples when we get them.
Algorithm questions were:
1. Given a set of records of the form (ticket no, person name), ticket nos. are unique. find the person having the maximum number of tickets.
2. Write a function in C to calculate the average of a integer numbers stored in an array. They wanted to whether you consider all possible errors and code it without mistakes.
In the 2nd round the team manager asked some behavioral questions- team projects, how have you handled conflicts, etc. She asked me to design the music player for an ipod, which went on to different ways of indexing, searching.
Final round was a typical HR interview.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersWhy finance?
- souravghosh.btbg March 28, 2011
Why computer science?
What motivates you, what interests you?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Behavioral - 0of 0 votes
AnswersWhy would you pick Bloomberg over the other company?
- souravghosh.btbg March 28, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Behavioral - 0of 0 votes
AnswersWhere other are you interviewing?
- souravghosh.btbg March 28, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Behavioral - 0of 0 votes
AnswersWrite a ‘translator’ program to convert a string (in C++ or other
- Anonymous March 27, 2011
language) into something which can be applied to the ‘where’ clause in sql
‘select’, here the string can be evaluated to a Boolean value, eg aa==3 &
& bb>12 || …| Report Duplicate | Flag | PURGE
Bloomberg LP C++ - 0of 0 votes
AnswersWhy Bloomberg?
- souravghosh.btbg March 27, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Behavioral - 0of 0 votes
AnswersGiven the following:
void foo (/* Add param here */) { } void main () { char *str; foo (/* Pass str somehow here */); printf ("%s\n", str); }
Complete foo.
- souravghosh.btbg March 27, 2011
Follow up question was:
You probably used malloc or new in foo. That will cause memory leak. Write it in such a way so that memory does not leak (Basically use global or static).
Eazy peazy!| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C - 0of 0 votes
AnswersGiven the stats that the highest occurring character in english text is 'e', given a cipher text as input, find out the plain text from it.
- souravghosh.btbg March 27, 2011
E.g.:
Given input "bloomberg", the highest occurring characters are 'b' and 'o'. Let's consider 'b'. According to our metric, highest occurring character should be mapped to 'e'.
So 'b' maps to 'e' in plain text.
Now shift all the other characters in the input to the output with the same shift offset.
Output for "bloomberg" = "eorrpehuj".
Also take care for character overflow, i.e. 'z' + 1 should map to 'a' (WRAP AROUND).
ALL CHARACTERS ARE LOWERCASE. Assume.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - -3of 3 votes
AnswersGiven the input array:
- souravghosh.btbg March 27, 2011
[2, 3, 5, 6, 12, 4, 2]
The output array is:
[2, 6, 18, 24, 30, 35, 38, 40].
Find the pattern between the two and write a program to convert input to output.
Simple enough.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersWhat is the maximum size of the file that can be accessed in a virtual memory machine?
- Shrikant Chaudhari March 16, 2011
Can you access 5GB file in a 32bit system entirely at the same time?
How would you determine the max file size?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Operating System - 0of 0 votes
AnswersDifference between Java and C++?
- Krish March 09, 2011| Report Duplicate | Flag | PURGE
NetApp Bloomberg LP Financial Software Developer Software Engineer / Developer C C++ Java - 0of 0 votes
AnswerTO write the String Tokeniser function for strseps.lib using pointers in C
- Anonymous February 27, 2011| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer