The phone screen consisted of a discussion about my recent work experience and how I improved the performance of a project. This was followed by C++ technical questions.
The algorithm problem was as follows:
Given a vector of characters called board, find the largest group size containing the same characters. For example, for input "ABCDCECCC", the largest group would be CCCC, if we make the string into a 3x3 matrix. The group sizes can be stored in a struct called LargestGroup, which holds the character, the starting index of the group and the group size.
I was unable to complete the implementation without some help from the interviewer. I converted the vector board into a vector<vector<int>> of size 3x3. Then I used BFS on each x and y of the 2D matrix. With each iteration of BFS, if the neighbor cells are the same character, then increase the groupSize. After each BFS on the x and y of the matrix, update a global variable called result with the max value. After iterating through the whole board, return the result.
With two minutes remaining, I asked the interviewer a few questions about the company and about himself.
Overall, it was a positive experience. The interview felt challenging, but I believe I performed to the best of my ability. I have not yet heard back, so I will continue to prepare for future interviews.