Google Interview Frontend Virtual Onsite

The frontend resources in the area are still limited, contributing a frontend interview experience from a well-known company.

Interviewed for the position of L5 Software Engineer, Frontend, the first interview consisted of 5 rounds (3 algorithm rounds, 1 frontend round, 1 googleyness round), followed by an additional 2 rounds (1 design round, 1 frontend round).

Interviewer 1 (Googleyness):

  • Working in cross-functional teams
  • Challenges faced in previous projects
  • Mentoring others
  • Balancing technical work and mentorship in the job

Interviewer 2:

  • Coding website “Yiwu Ling”
  • Follow-up question, adding an operation to support assignment
  • For example, given “a b 5 = = a 1 +”, the expected final result should be 6

Interviewer 3:

  • Battleship game scenario with a 2D matrix containing only 0s or 1s (0 for water, 1 for a ship)
  • Ships can only be horizontal or vertical and cannot be adjacent
  • Implement two operations:
    • isShot: Check if a cell has been shot, return true if yes, false otherwise
    • shoot: Shoot at a cell, return water | shot | sank (indicating if the shot hit water, ship, or sank a ship)
    • Each cell can only be shot once, repeated shots should result in an error
    • Follow-up question on optimizing the shoot function for O(1) time complexity

Interviewer 4:

  • Given a JSON array and a match pattern
  • Tasked with finding the corresponding item in the data based on the match pattern
  • Discussion on optimizing search time complexity, suggesting the use of a trie structure

Interviewer 5 (Promise):

  • Provided an array with API URLs, prioritize based on the array order
  • Find the highest priority success result
  • Handle rejection if all APIs reject
  • Perform API calls in parallel

Interviewer 6 (Additional Interview 1) - Frontend Product System Design:

  • Design a type-ahead widget
  • Requirement clarification, mockup, data model, API definition
  • Discussion on API error handling
  • Asked about optimizing the type-ahead widget from a product perspective while collaborating with a PM

Interviewer 7 (Additional Interview 2) - Frontend Coding:

  • Tasked with rendering a file directory tree
  • Design data structure and write HTML/CSS/JS without frameworks, using VanillaJS.