Borealis AI Interview Experience


This post is to share my interview experience with Borealis AI for a Senior Software Engineer position in Toronto(July 2019). I was initially contacted by a recruiting agency who co-ordinated the interview process.

Round 0 - Online Coding

The first round was done over Google Hangouts and involved solving a problem on Coderpad. After the usual introductions, the interviewer asked the following question:

Given an array of words, find all possible 2-word pairs, where the words are adjacent. For eg. if input is "My name is Leo", output should be: [[My, name], [name, is], [is, Leo]].

I try to follow a TDD approach during these types of interviews when possible, so I wrote a list of test cases and confirmed the expected behaviour with the interviewer. Once done, I implemented my solution, ran the tests and fixed issues that popped up. Once all the tests passed, the interviewer asked a follow-up question:

Given an array of words and a number 'n', find all possible n-word pairs, where the words are adjacent.

I followed the same process as the previous question: TDD Tests -> Code -> Run tests -> Fix test failures, if any. The interviewer seemed to be happy with the solutions for both questions, and we wrapped up the interview a few minutes ahead of time.

The recruiting agency I was working with confirmed that I cleared this round and scheduled my on-site rounds for the next week.

Round 1 - Problem solving + Coding

The first on-site was focused on testing my problem solving and coding skills. The interviewer started off with the following question:
Given 2 numbers represented as a Strings, find their sum (without using any built-in types like BigInteger)

The catch is that the numbers may to too large to fit in an integer type, so converting the string to integer type is ruled out. The solution is discussed in GeeksforGeeks, if you are interested. I had heard of this question before, and was able to come up with a solution relatively quickly.

After I wrote my code on the white board, the interviewer reviewed it and asked me to identify cases my solution will not handle. I realized that my code does not handle -ve integers, and the interviewer asked me to address this limitation. I had to implement a subtract function for this (described here in detail) and I then realized there are more cases than I had anticipated (both numbers being negative, etc). In the end, I completed around 80% of the expected solution before we ran out of time.

Round 2 - Problem solving + Coding

The second on-site round was also focused on problem solving and coding and was with an Engineer from their Vancouver office. Since the interviewer was remote, we solved a problem on Coderpad. The following was the question I was asked:

Find a number in a rotated sorted array

As usual, I followed TDD, came up with tests, confirmed expected behaviour from the interviewer and started coding away. My initial solution had a couple of off-by-one errors, but I was able to fix them quickly make all the tests pass in the next attempt.

This is a standard interview question, which you can practice on Leetcode, if interested.

Round 3 - Data structures + Coding

The third on-site round was focused on data-structures and coding. The following was the question asked:

Given a method click() that simulates a user clicking a link, write methods to get the number of clicks in the last 1 second, 1 minute and 1 hour

This is very similar to a question asked during my interview with Stackadapt. However, I feel stupid about not researching the solution enough after my Stackadapt interview, and gave the same sub-optimal solution for the second time in this interview 😞. I was asked to whiteboard the solution and I can tell that the interviewer wasn’t satisfied and was expecting a better solution.

Round 4 - System Design

The fourth round was with a Machine Learning engineer and was focused on System Design. The following was the question he asked:

Design a data pipeline for a Machine Learning system

I did not have any experience building data pipelines before, and most of what I discussed during this round was based on tech blog/talks I had come across.

We talked about having an ETL Pipeline from source data, with some spark jobs to transform to the destination schema , airflow to co-ordinate/sequence the jobs, and HDFS to store any intermediate data. Machine learning models can then be run on the pre-processed data, and the results can be stored in a separate datastore(based on the consumer needs). We then discussed about exposing APIs to facilitate the ML devs to figure out which of their model was most accurate. Also discussed about data/schema versioning, ML model versioning to ensure that results for same data + different ML model or same ML model + different data combinations are persisted).

I required a lot of hints from the interviewer (who was super nice throughout) during our discussion, and I wasn’t very confident about my chances of making it. A couple of days later, I was told that I would be having another system design round with an engineer from their Vancouver office.

Round 5 - System Design

This round was over Google Hangouts and focused on System Design. The following was the question asked:

Design a pipeline for a Maching Learning system

To my disappointment, the question was very similar to what I got in my previous round (which I goofed up), but with slightly different requirements. One requirement was to track the lineage of data from source to destination - if data gets corrupted, only the specific set of records can be identified and the jobs can be re-run for that specific data. I suggested using a row-level recordId to track from source to destination, and a replay framework that takes a list of corrupted recordIds and replays them through the spark jobs.

I wasn’t sure what to expect in the last 2 rounds - Both turned out to be related to building data-pipelines for ML -systems, something I did not have a lot of knowledge/experience on. I wish the system design questions were more general which I feel would’ve given me a decent chance of cracking it.

Final Thoughts

I did not get an offer at the end of the process - I’m pretty sure I didn’t do well enough in the last 2 rounds. But everyone I met was really intelligent and down-to-earth and it was a great learning experience for me. I ended up feeling a bit disappointed about not getting an offer.

See Also