Skip to content

Instantly share code, notes, and snippets.

View rahulbakshee's full-sized avatar
🎯
Focusing

Rahul Bakshee rahulbakshee

🎯
Focusing
View GitHub Profile
@rahulbakshee
rahulbakshee / google-graph-connected-components-sorted-array.py
Created April 25, 2025 21:22
Google Interview Question - connected components given sorted array
"""
https://leetcode.com/discuss/post/6686960/google-swe2-phone-screen-rejected-by-ano-ek6t/
📌 Company: Google
📍 Round: Phone Screen
🧠 Role: SDE-2
🗓️ Experience: 2 YOE
🧪 Question: Graph Connectivity via Value Proximity
Prompt: Given a sorted array arr of size N, and an integer diff,
@rahulbakshee
rahulbakshee / google-interview-question-coke-machine.py
Last active April 15, 2025 17:22
Google Interview Question - Coke Machine
"""
Given a coke machine with a series of buttons. If you press a button it will get you a certain range of coke.
Find out if it's possible to get the target range of coke. You can press buttons any number of times.
Example 1:
Input: buttons = [[100, 120], [200, 240], [400, 410]], target = [100, 110]
Output: false
Explanation: if we press first button it might give us 120 volume of coke, not in the target range.
Example 2: