Bloomberg LP Interview Report
- 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 - 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++