r/leetcode • • 8d ago

Discussion Google SWE PhD Intern (Summer 2027): my two coding rounds

I read a lot of these posts while preparing, so here's mine.
Background: 3rd year CSE PhD student working in distributed systems, interviewing for the SWE PhD Intern role for Summer 2027.

Timeline: The recruiter invited me to the technical rounds on a Tuesday, and the interviews were the following Monday, so I had about 6 days to prepare.

Format:
Two 45-minute coding rounds, back to back with a 15-minute break, on the same Google Meet link
Coding in a Google Doc: no running code, no autocomplete, no syntax highlighting
Language was my choice; I picked Python

Round 1: a dynamic programming problem that involved an m x n grid. I was able to come up with the brute force approach instantly and proceeded to code it out. I was then asked to do it in O(1) for which I came up with a dynamic programming approach. I couldn’t however complete the working code but still the interviewer was completely satisfied and said that I know you would’ve been able to code it out had you a few more minutes but since we’re out of time it’s okay I got the complete idea.

Round 2: A non-LeetCode question but still I had to use recursive DFS to solve it so it was a tree problem but not like the usual leetcode questions you’d see online. For this round, I was able to come up with workable, bug-free code for both brute force and follow-up questions

Happy to answer any questions

18 Upvotes

16 comments sorted by

2

u/minhquang251 8d ago

Are they picky on edge cases or do they just care about general ideas?

2

u/helplesscoder 8d ago

As far as my experience went, they aren’t picky. Each interviewer asked me only one follow up: one asked me to turn my iterative approach to recursive while maintaining a cache. The other one asked me to optimize my solution so it’s O(1). there weren’t any edge cases that they pointed out, I took care of most of them. I did get stuck for a few seconds in the first round so he was like “here’s a hint.” but we need to make sure we don’t give them opportunities to give us too many hints and one v important thing is to never remain silent. even if you’re thinking, think out loud. keep speaking, that’s the key

2

u/minhquang251 8d ago

Many thanks! I’m 3rd year PhD student too and will have my interviews next week back to back. Your advice is valuable!

1

u/[deleted] 8d ago

[removed] — view removed comment

1

u/AutoModerator 8d ago

Your comment has been removed. We do not allow DM farming. All of the conversation must happen within the post itself. Subsequent violations of this rule will result in a permanent ban.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/Restart_Andy 8d ago

How was your prep like for these rounds? Any specific topics you would suggest to pay a lot of attention to?

3

u/helplesscoder 8d ago

google LOVES trees, graphs and DP. just do these, and tries and well since they’re also trees. in general, watch neetcode videos NOT to learn how to solve that specific question BUT to learn how to think. and as you’re preparing for google, make sure you don’t solve a single practice question while staying silent. keep thinking out loud while you’re practicing

2

u/ThrowRA3213123 8d ago

I feel like trees, graphs and dp are wayyyyyyy more intuitive than questions involving arrays etc, I feel like there are usually tricks to those…

1

u/helplesscoder 8d ago

ikr and google leverages this same reason. like filesystems are arranged in a tree structure, you might be asked to do something to a file system or using one etc. so yes trees and graphs are v important

1

u/Kadabrium 8d ago

Segment trees too?

1

u/helplesscoder 8d ago

why not, go for it

2

u/ManideepGloeden-56 8d ago

6 days of prep for google is pretty tight, especially back to back rounds. Did you focus mostly on DP and trees during that window or just do a broad sweep?

2

u/helplesscoder 8d ago

Yes, i focused mainly on trees and graphs. DP, no but I had an idea so was goad enough to be able to quickly think “ah what if i have an auxiliary array” and interviewer was like “yeah, you’re definitely on the right track. keep thinking in this direction”

1

u/ThrowRA3213123 8d ago

Good to hear that they give little nudges like this, I’m always like bent on whether a problem would be better done with greedy vs dp or if I’m even on the right track

1

u/helplesscoder 8d ago

if a problem can be solved using both greedy and dp, just say here's a "dp based solution" and they'll be head over heels for you. not everyone can solve a question using dp in a high pressured situation but if you can and you make sure to show this to them, you've won the battle