Tech IndustryJan 17, 2020
Ciscofjshwhd2

Code perfectness in FAANG interviews

How perfect does our solution have to be for FAANG (especially G) interviews? Do they also care about how clean, modular, and efficient the code is? I remember that F takes a photo of the code and I wonder if they actually get reviewed thoroughly. Will it be enough (for entry level) to have a decently optimal solution with bug-free codes, or does it have to be super clean and modular? What is the general expectation?

Add a comment
Amazon lkiD443 Jan 17, 2020

At Amazon there is one interviewer specifically looking for clean/maintainable code. Another is looking for algos/ds knowledge, another is looking for problem solving ability.

Cisco fjshwhd2 OP Jan 17, 2020

What could be some factors that determines cleanness/maintainability?

Amazon lkiD443 Jan 17, 2020

Read the first few chapters of Clean Code by Robert Martin to understand good method/variable naming. Use constructor injection if appropriate. Think about how you would write a test for the code you are writing.

Square Shop>SQ Jan 17, 2020

I got a 5 offer and I wrote some bugs in code but fixed them by the time the round was done. As long as they're not egregious it's fine. You really don't have to be perfect. You just state a solution, they say if that's optimal enough or not. If it's not then you keep trying for better. You don't need to have code be modular, at least at FB because you're asked two coding questions per round on top of domain knowledge questions.

Cisco fjshwhd2 OP Jan 17, 2020

Are you saying FB starts with a domain knowledge question and moves on to a algo/ds coding interview?

Square Shop>SQ Jan 17, 2020

Yep, at least for mobile roles. I had roughly 5-10 mins of domain knowledge questions then 2 ds coding questions per round for 2 rounds

Google Tier 3 Jan 17, 2020

Algorithm is more important, unless your code is distractingly bad

Google cloudy sky Jan 17, 2020

We take pictures of the code so we can write about it later. We have a short period to watch you write it and spend a longer period afterwards writing up a thorough analysis to go with a hire/no hire recommendation, for a hiring committee to look at later. Taking a photo afterwards makes it possible to add the code to the write-up without having to type while you write. Yes, I look for readable and good code, as well as correctness and efficiency.

Cisco fjshwhd2 OP Jan 18, 2020

Thanks for the reply. How would to define readable and "good" code?

Facebook pJgO48 Jan 19, 2020

Hey, I'm puțin together a channel in YouTube about software engineering. The first topic will be interviewing. You can check the general interview process here https://youtu.be/GWM9uS7J-as Thank you and let me know if you have any feedback!