Bloomberg | London | Software Engineer | Phone | 2021 Summer Internship
Anonymous User
2352

Phone interview 1 hour:

  1. Interviewer introduced himself

  2. Me introduced myself
    a. my internships/working experience
    b. why Bloomberg

  3. Coding problems:
    3.1 Given a binary tree, determine if it is a valid binary search tree (BST). (https://leetcode.com/problems/validate-binary-search-tree/)
    I wrote my solution in C++. It was simple dfs with borders checking. Code was about 10 lines, so I wrote it pretty fast. Then I proposed to test it by myself and checked my algo step-by-step.

    • Follow up questions:
      a. What is the runtime & space complexity?
      b. Memory consuming of recursion
      c. How to implement it without recursion?

    3.2 Given two unsorted arrays of integers. Check if there is at least one pair of numbers from both arrays such that their sum will be target

Input:
arr1 = {1, 2, -1, 2, 5}
arr2 = {12, 55, -24, 3, 8, 0}
target = 8

Output:
true

Explanation:
5 + 3 = 8, valid answer because both numbers from different arrays
8 + 0 = 8, but its invalid answer because both numbers from one array

I found this problem similar to two-sum(https://leetcode.com/problems/two-sum/), so I proposed 3 different solutions(brute force, bin search + sorting, hashmap), explained approaches and time/memory complexity, and different time/memory optimizations for the last two approaches.
The interviewer asked me to implement a hashmap solution, I coded it and that was all.

  1. I asked him questions about Bloomberg.

The interviewer is very friendly and chatty. This was one of my first phone interviews and I am very pleased that it went so smoothly.
Feedback: passed to the next interview.

Comments (6)