Bloomberg | SDE | Princeton | Virtual Onsite | Reject
Anonymous User
1418

Just had an onsite with Bloomberg and did not move to the next rounds.

Round 1 :

  1. Given a sequence of integers, tell me the mode and the frequency that it occurs
    e.g. [1, 4, 4, 2, 1, 4, 5] = 4, 3 times

The interviewer wanted me to code in C++ but I said I am a python developer and I coded in python

  1. Find the common ancestor of a BST given root and two nodes

Follow up : What is the tree did not contain any of the nodes.

  1. Design and implement a module that provides a simple web browser history functionality. The module should be capable of capturing and providing the web URLs visited in chronological order (most recently visited first). Each URL should be listed only once.

    Example of inputs is to visit

    http://www.bloomberg.com,
    then visit http://www.bbc.com,
    then visit http://www.cnn.com
    then visit http://www.bbc.com again.

    The expected output for this case is:

    http://www.bbc.com
    http://www.cnn.com
    http://www.bloomberg.com

    Round 2:

    1. Challenging project
    2. Find if there is a problem in the below code
int StockTradeOrder::finishSettlement() {

  ...

  // The object won't be used again after this method.
  delete this;
  return 0;
}

Again I told them I am not a C++ developer but a python developer.

  1. Given a SINGLY linked list and an offset i, find the i-th value from the TAIL.

Discussed all the approaches. Not sure why some interviewers are so impatient.
You know when there are two interviewers, I cannot talk to both of you at the same time. I was answering a question of one interviewer and the other one kept jumping in.
I wrote a program and there were mistakes and i was trying to trace it and ofc I would have found it when i traced, this guy SSE was so over enthusiastic to correct me. Sorry I cannot do two things at once.

  1. The class definition below stores apps currently available in the store as well as some metadata about the publishers of these apps. We want to add the following two new functions in AppStoreDataService class:

    replacePublisherName(): ability to change name of a given publisher
    getAppsByPublisher(): get list of apps for a given publisher.

    You can change internal data-structure and design in any way you want, but keep the current functionality intact. There are millions of apps published by millions of publishers and any linear search across this data is very expensive. At the same time, the current system is already running high in memory usage. We need to keep runtime complexity and memory usage in mind with the new improved design.
    Physical Materials

Following class currently supports functionality of an AppStore:

class AppStoreEntry
{
  public:
    string _appId;               // Unique for each app
    string _appName;
    string _category;

    string _publisherId;         // Unique for each publisher
    string _publisherName; 
};

class AppStoreDataService
{
  private:
    std::unordered_map<string, AppStoreEntry> _data; // Apps in the store

  public:
    // Existing Functionality
    addNewApp(const AppStoreEntry& data);
    removeApp(const string& appId);
    getAppName(const string& appId, string& appName);

    string getPublisherName(const string& publisherId);    // Tries to find publisher by iterating all apps

    // New functionality to be implemented (part of question)
    //void replacePublisherName(const string& publisherId, const string& newName);
    //void getAppsByPublisher(const string& publisherId, vector<string>& outAppNames);

};

string AppStoreDataService::getPublisherName(const string& publisherId)
{
  std::unordered_map<string, AppStoreEntry>::iterator it;
  for(it=_data.begin(); it!=_data.end(); ++it)
  {
    if(it->second._publisherId == publisherId) return it->second._publisherName;
  }
  throw std::invalid_argument("Bad publisher id: "+publisherId); // In case we don't have
}

Again this is a C++ code and I am a Python developer.

Last thoughts :

  • I dont know if recruiters tell interviewers which language the candidate is using
  • If you are looking for a C++ developer why say python is OK too on the job portal
  • Interviewing at Bloomberg is a totally hit or miss. I would have got an offer elsewhere
  • Interviewers are so biased. This one guy in the 2nd round never made an eye contact with me and was indifferent right from the beginning. Not sure that is cos I am on a work Visa or he is just like that.
  • I leart how not to interview a candidate
Comments (4)