Google SWE Intern — Two Fresh Interview Experiences | Successfully Passed Both Coding Rounds Smoothly

571 Views
No Comment
Google SWE Intern — Two Fresh Interview Experiences | Successfully Passed Both Coding Rounds Smoothly

Google SWE Intern interview on 2 rounds of interviews, mainly examining the algorithmic design part of the study, focusing on data structures and algorithmic fundamentals, including dynamic programming, graph algorithms, tree operations, sorted search.
The main focus is on data structures and algorithm fundamentals, including dynamic programming, graph algorithms, tree operations, sorting and searching, and other classic problems. Common topics are maximum subarray and, LRU cache implementation, binary tree LCA, serialization deserialization, etc., need to master the time-space complexity analysis.Google interview with its own text editor, no Google Doc; suggest that mock students with text editor practice.

Google SWE Intern VO Round 1

Question: Google Company has a bunch of requests for conference room booking records, each record has start_time and end_time. return the minimum number of rooms needed.

Clarify questions

  1. Does the time interval start at start or end?
    • If it is half-open interval [start, end): end == next.start Can reuse the same room.
    • If it is closed interval [start, end]: end == next.start Considered conflicting, need new room. (You need to ask for this upfront during the interview, if not specified, it usually defaults to a half-open room.)
  2. Is the input likely to be empty? Is there a start == end session?
  3. Does the time have an upper bound/is it an integer?
  4. Has the input been ascending by start_time?

Ideas

Meetings are processed by start time, with a small root stacked with the "earliest end time of the room being occupied" for each new meeting:

  • If the top-of-stack end time <= the new session start time, it means a room is free - pop it and reuse it;
  • Otherwise a new room needs to be opened - directly pressing the end of the new meeting into the pile.
    Use a variable to record the maximum size the heap has ever reached, i.e. the number of rooms required.

Complexity: time complexity O(Nlog N), space complexity: O(N).

Google SWE Intern VO Round 2

This round of interview includes BQ session and two coding questions. The interviewer is an American guy, very nice, simple pleasantries directly into the main topic, the overall rhythm is quite comfortable, the following briefly share.

BQ

  1. Tell me an example of a time when you learned an important lesson from a failed project?
  2. If you and a coworker disagreed on a technical solution, how would you handle it?
  3. Describe an experience where you took the initiative to help a team member improve their technical skills?

Coding

Question: Variable Range Summation This question requires the design of a data structure that can both query the sum of an interval of an array and support updating the value of an element.

Ideas: The most appropriate solution is to use a line tree, construct the array as a binary tree structure, and each node stores the sum of its children, so that both the query and the update can be completed in O(log n) time.

Follow up:

  1. Can you think of any other methods besides a line tree? Please compare their advantages and disadvantages.
  2. If this array is very large and needs to be updated frequently, what might be the memory and performance bottlenecks in your line tree implementation? How can you optimize it?

Passed the whole thing with flying colors! I'm familiar with OA and VO at Amazon, Meta, Microsoft, Google, and other big North American factories, and I've been able to pass them all with flying colors. If you also need Google interview helper, interview assistance, OA ghostwriting and other services, please contact us.

author avatar
ProgramHelp
END
 0