London: Amazon | Facebook | Google [3 offers]
Summary
I successfully interviewed with Amazon, Facebook, and Google for a Senior Software Engineer role in London, ultimately receiving offers from all three companies. This post details my comprehensive interview experience across various rounds, including specific coding and system design questions encountered, along with my personal preparation strategy.
Full Experience
Hello everyone! I'm excited to share my interview journey with Amazon, Facebook, and Google, which culminated in three offers. I also received offers from Snap and Spotify, but I'll be focusing on the FAANG companies in this post.
I hold a BS degree in a non-Computer Science field and have 5 years of experience as a Senior Software Engineer.
Amazon Interview Experience
Phone screen
- I was asked 2 Leadership Principles (LP) questions.
- For coding, I solved the Max Area of Island problem.
Onsite coding 1
- Again, 2 LP questions were part of this round.
- The coding challenge was to implement T9 predictive text. I referenced discussions like this one for context.
Onsite coding 2
- This round also included 2 LP questions.
- The technical problem was the Award Budget Cuts problem.
Onsite coding 3
- Another round with 2 LP questions.
- I had to implement an LRU Cache with TTL (Time-To-Live) functionality, similar to what's discussed here.
System design
- Following 2 LP questions, I was asked to design a YouTube-like Android application, with a strong emphasis on player functionality.
Facebook Interview Experience
Phone screen
- I encountered a problem similar to Random Pick Index, specifically asking to return a random largest element in an array.
- Another problem involved returning the count of elements with a specific value K in a sorted array, similar to Find First and Last Position of Element in Sorted Array.
Onsite coding 1
- The first question was to convert an array of digit characters (e.g., ['1', '2', '3']) into its corresponding integer (123).
- I also had to write a comparator function for natural order sorting of strings, so that "photo_2" comes before "photo_10".
Onsite coding 2
- I had a problem that required determining if an array contains a continuous subarray whose sum equals K, similar to Subarray Sum Equals K.
- The other problem was Maximum Swap.
System design
- I was tasked with designing the Android application architecture for a news feed.
Behavior
- This round involved several LP-style questions about my past most complicated tasks, experiences receiving feedback, and how I handle restrictions.
System design follow-up
- A follow-up system design question was to design the Android application architecture for an images-only messenger.
Google Interview Experience
Interestingly, I skipped the phone screen due to other onsite appointments and also the system design interview for some reason.
Onsite coding 1
- I had to find all Confusing Numbers within a given range.
Onsite coding 2
- This round featured a graph DFS question, with a BFS follow-up.
Android platform
- I was asked to implement multiplication of two numbers without using the '*' or '/' operators.
- Another task was to code a basic timer Android application.
Behavior
- Similar to Facebook, this round consisted of LP questions concerning my most challenging past tasks, feedback experiences, and handling constraints.
Interview Questions (16)
Max Area of Island
Find the maximum area of an island in a 2D grid where '1' represents land and '0' represents water. An island is a group of '1's connected horizontally or vertically.
Implement T9 Predictive Text
Design and implement the T9 predictive text algorithm and system. This involves mapping phone keypad digits to letters and suggesting words based on the input sequence.
Award Budget Cuts Problem
Given a list of grants and a budget, find a cap such that if all grants greater than the cap are reduced to the cap, the total budget is met. Grants smaller than the cap remain unchanged.
LRU Cache with Time-To-Live (TTL)
Design and implement an LRU (Least Recently Used) cache where each key-value pair also has a time-to-live (TTL) expiration. If an item's TTL expires, it should be removed from the cache.
Design YouTube-like Android App (Player Focus)
Design the architecture for an Android application similar to YouTube, with a particular focus on the video player's functionality and performance.
Random Pick Largest Element
Given an array, return a random index of the largest element. If there are multiple largest elements, any of their indices can be returned with equal probability.
Count Elements with Value K in Sorted Array
Given a sorted array and a target value K, return the number of occurrences of K in the array.
Convert Digit Character Array to Integer
Given an array of character digits, convert it into a single integer. For example, ['1', '2', '3'] should result in 123.
Natural Order String Comparator
Write a comparator function for sorting an array of strings in natural order. For example, 'photo_2' should come before 'photo_10', not 'photo_10' before 'photo_2' as in lexicographical sort.
Continuous Subarray Sum Equals K
Given an integer array and an integer k, return true if the array has a continuous subarray of size at least two whose elements sum up to k.
Maximum Swap
Given a non-negative integer, you could swap two digits at most once to get the maximum possible number. Return the maximum possible number.
Design News Feed Android App Architecture
Design the complete Android application architecture for a news feed, considering aspects like data fetching, caching, UI rendering, and scalability.
Design Image Messenger Android App Architecture
Design the Android application architecture for a messenger that exclusively handles image sharing, focusing on efficiency, storage, and delivery.
Find Confusing Numbers in Range
A confusing number is a number that when rotated 180 degrees, it becomes a valid number and it is different from the original number. The digits that can be rotated are 0->0, 1->1, 6->9, 8->8, 9->6. Find all confusing numbers in a given range.
Multiply Two Numbers Without Asterisk or Slash
Implement a function to multiply two integers without using the multiplication (*) or division (/) operators.
Code Android Timer Application
Implement a basic timer application for Android, including functionality like start, pause, reset, and displaying elapsed time.
Preparation Tips
My preparation strategy focused on three main areas:
Coding
- I extensively practiced on LeetCode, solving a total of 623 problems (178 Easy, 395 Medium, 50 Hard).
- I also dedicated time to reading various articles and watching relevant YouTube videos.
System Design
- For system design, I spent several days reviewing YouTube content and articles.
- I also compiled a list of trade-offs to discuss during the interviews, which proved very helpful.
Behavioral
This was perhaps the most challenging aspect for me, as I am not a native English speaker and felt my English proficiency might not be adequate for these rounds. To address this, I incorporated behavioral preparation into my English lessons.
I created a spreadsheet and worked through all possible behavioral questions with my English teacher. He was incredibly helpful, not only with my English but also in refining my answers to align with company expectations. I highly recommend him for LP preparation, especially for non-native speakers. His Skype contact is: live:caiohpf