Phone interview with a senior developer.
A programming question was asked and answered (implemented) via a web portal, which the interviewer could see directly.
The interviewer was very friendly; however, I had some difficulty understanding the conversation due to the phone connection.
This is a C++ question.
Implement a StockMarket class in C++ that has the following two functions:
cpp class StockMarket { public: void addTrade(string stockName, int share); // This function tracks the number of shares transacted for a stock by adding the trade information.
void printTop(int numberOfStock);
// This function prints the top `numberOfStock` stocks that have the highest number of transacted shares.
};
Here is a sample calling sequence that uses the above class:
cpp StockMarket stockMarket; stockMarket.addTrade("GOOGLE", 50); stockMarket.addTrade("APPLE", 150); stockMarket.addTrade("GOOGLE", 100); stockMarket.addTrade("MSFT", 250); stockMarket.addTrade("GOOGLE", 200);
stockMarket.printTop(2);
Expected output:
GOOGLE 350 MSFT 250
The following metrics were computed from 157 interview experiences for the Bloomberg LP Senior Software Engineer role in United States.
Bloomberg LP's interview process for their Senior Software Engineer roles in the United States is very selective, failing most engineers who go through it.
Candidates reported having good feelings for Bloomberg LP's Senior Software Engineer interview process in United States.