Bloomberg LP Interview Report
- 0of 0 votes
AnswersGiven the following structure Record and we have million of records on disk.
- Itcecsa August 13, 2014 in United States
struct Record
{
char[257] name;
int startTime;
char[257] description;
}
Now we want to keep a in-memory cache which is represented in class ManageRecords to perform 2 methods GetDesriptions and GetRecords. Given that we have very big memory and we can use any data structure so that the 2 methods can be performed really quick. Here are the questions:
1. what should be the return type for method GetDesriptions
2. what should be the return type for method GetRecords
3. what data structure should we use in the private part as commented out below
class ManageRecords
{
public:
ManageRecords();
? GetDesriptions(char[] name);
? GetRecords(int begin, int end); //do a range search based on startTime of structure Record
private:
// what data strcture should we use here?
}| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer Algorithm - 0of 0 votes
Answersin a Hadoop-like system, how do we manage multiple nodes collaborating together without having a master node?
- Itcecsa August 13, 2014 in United States
my answer was running a back end job to randomly select a node to be a master node; and whenever the master node goes down, the backend job select a new node.| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer System Design