Coding Projects
May 28, 2025 at 04:52 PM
Google Interview Experience Role: L4 Software Engineer Compensation: 45 L + 10 Application Mode: Direct Application 𝗥𝗼𝘂𝗻𝗱 𝟭: 𝗦𝗰𝗿𝗲𝗲𝗻𝗶𝗻𝗴 𝗥𝗼𝘂𝗻𝗱 𝟭 (𝗗𝗦𝗔 + 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻 𝗙𝗼𝗰𝘂𝘀) - Problem: Given a list of points forming overlapping rectangles on an XY plane, determine a vertical line that divides the total area into two equal halves. - Edge conditions: - Rectangles may overlap. - The vertical line can pass through rectangles. - Similar: Rectangle Area II (https://lnkd.in/d-QQCup2) 𝗥𝗼𝘂𝗻𝗱 𝟮: 𝗦𝗰𝗿𝗲𝗲𝗻𝗶𝗻𝗴 𝗥𝗼𝘂𝗻𝗱 𝟮 (𝗗𝗦𝗔) - Problem: Design a function to return all subarrays from an integer array that form strict arithmetic sequences with a common difference of ±1. - Additional task: Write unit test cases for boundary and edge conditions. - Similar: Arithmetic Subarrays (https://lnkd.in/d2h87T_Q) 𝗥𝗼𝘂𝗻𝗱 𝟯: 𝗢𝗻𝘀𝗶𝘁𝗲 𝗥𝗼𝘂𝗻𝗱 𝟭 (𝗖𝗼𝗻𝗰𝘂𝗿𝗿𝗲𝗻𝗰𝘆 + 𝗦𝗰𝗵𝗲𝗱𝘂𝗹𝗶𝗻𝗴) - Problem modeled around a job scheduler system with access to 2 blocking APIs: - countWords() → blocking call, doesn't imply task is done - isTaskCompleted() → confirms completion - Goal: Efficiently schedule tasks on N machines such that: - Jobs are evenly distributed - Minimal use of blocking APIs - Job completion status is monitored accurately 𝗥𝗼𝘂𝗻𝗱 𝟰: 𝗢𝗻𝘀𝗶𝘁𝗲 𝗥𝗼𝘂𝗻𝗱 𝟮 (𝗗𝗲𝘀𝗶𝗴𝗻 + 𝗔𝗣𝗜 𝗧𝗵𝗶𝗻𝗸𝗶𝗻𝗴) - Design a Library to evaluate Boolean expressions with multiple variables. - Expressions can include AND, OR, NOT, and parentheses. - Expectation: - Design user-facing API - Handle expressions like ((a || b) && c) and a && ~a - Evaluate whether the expression can be true in any configuration - Discuss space/time complexity (Brute-force: O(2^n)) - Also asked to define: - Public APIs - Expression parsing approach - Internal classes and method signatures - Similar: Remove Invalid Parentheses (https://lnkd.in/du59E4MS) 𝗥𝗼𝘂𝗻𝗱 𝟱: 𝗢𝗻𝘀𝗶𝘁𝗲 𝗥𝗼𝘂𝗻𝗱 𝟯 (𝗗𝗲𝘀𝗶𝗴𝗻 + 𝗥𝗮𝗻𝗱𝗼𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻) - Problem: Design a music playlist shuffler that returns songs randomly, with the constraint: - No song should repeat within last K plays - Expectation: - Randomness close to rand() in C++ - O(1) time complexity - O(K) space - Additional task: Write test cases and explain tradeoffs - Similar: Shuffle an Array (https://lnkd.in/dpKA-JZ2) 𝗥𝗼𝘂𝗻𝗱 𝟲: 𝗚𝗼𝗼𝗴𝗹𝗶𝗻𝗲𝘀𝘀 (𝗕𝗲𝗵𝗮𝘃𝗶𝗼𝗿𝗮𝗹 𝗥𝗼𝘂𝗻𝗱) - Questions asked: - How would you handle an underperforming team? - What strategies would you use to resolve team conflicts? - How do you help a teammate grow technically? *React ❤️ for more*
❤️ 🙏 12

Comments