Google L4 Phone Interview - 28th March 2025

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-03-28Added By Anonymous
Source: Link
🧭 Experience: unknown
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: Google
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown

**1 Question: 45 Mins**

For a change the interview started with direct question without any introduction.

First of all she presented a **Warm Up Question** related to traversing grid and asked me how would I solve it (no need to code). I explained my approach.

**Warm Up Q:**
**Given a NxN grid, S & T are start & target cells repectively. Cells may be filled with water which blocks the path for traversal. Check if path exists from S -> T.**

*Since you have to think out loud, there were some question asked on ways to approach problem; like what went wrong with other approach 1 etc*


## **Actual Question:**

It was basically the follow up of the above question with some constraints added.

#### Constraint:
Now C (representing cat) is present in one of the cell. Find the path with maximum distance from C while travelling along the path from S -> T. Distance is Manhattan distance which is sum of diff of x & y coordinates of both.**

Also path can also cross cell C, resulting in 0 as maximum distance.

*I explained a brute force approach for exploring multiple paths and returning the max distance but she asked for an optimal solution & coding it*
Comments