Google Frontend Interview Questions I was asked

Years ago, when I was just starting my first job, a friend referred me, but I was probably overlooked at that time. It wasn’t until I had two to three years of experience that my resume was pulled out of the database.

Since I primarily focus on frontend development, the interview process followed the frontend direction. During the initial call with the recruiter, it was mentioned that the technical interview would be on Data Structures and Algorithms, so I mainly prepared by practicing on LeetCode.

During the interview, there was a slight delay due to some technical issues. After a brief one-minute introduction from both sides, the interviewer directly presented a frontend-related problem via Hangout, which caught me off guard for about thirty seconds as it was not about Data Structures or Algorithms.

The interviewer showed a simple computer image with numeric keys, plus and minus signs, an equal sign, a Clear key, and a display screen. He asked me to write all the helper functions where each key press would display the calculated result, for example:

  1. 123 =》 123
  2. 123 + =》 123
  3. 123 + 1 =》1
  4. 123 + 1 - =》124
  5. 123 + 1 - 1 =》1
  6. 123 + 1 - 12 =》12

Since there were no decimal points or negative numbers, the problem wasn’t too difficult. However, the unexpected nature of the question serves as a reminder to always confirm the interview type with the recruiter for better preparation.