Glean | Phone Screen | Dec 2024 | Reject

Posted
4 Apr 2025
310 reads

Summary

I had a phone screen with Glean where I was asked three interconnected matrix-based problems involving pathfinding from a desk to a snack while avoiding bosses and considering a 'noise' factor, which ultimately led to a rejection.

How it went

You are given a matrix where each cell can have values

D - your desk B - Boss's desk (can be multiple) S - Snack (can be multiple) . - empty

- wall

first question -> Find if it's possible to get a snack from your desk without disturbing any boss. BFS

second question -> If the snack has a noise value K. K represnt the number of empty spaces the noise can travel through. find if its' possible to get the snack without disturbing any boss' through noise.

sol. first do multisource bfs from All B's and store min distance of a cell from any B's. then do a BFS from D to S such that you do not use any points where dist(cell) <= k from B

third question ->

Find the maximum value of K for which you can get the snack without distrubing any B's.

Binary Search on K with the solution of 2nd.

Questions asked (3)

  1. 01

    Path to Snack Avoiding Bosses

    Data Structures & Algorithms

    You are given a matrix where each cell can have values: D - your desk, B - Boss's desk (can be multiple), S - Snack (can be multiple), . - empty, # - wall. Find if it's possible to get a snack from your desk without disturbing any boss.

  2. 02

    Path to Snack Avoiding Bosses with Noise

    Data Structures & Algorithms

    If the snack has a noise value K, which represents the number of empty spaces the noise can travel through, find if it's possible to get the snack without disturbing any boss' through noise.

  3. 03

    Maximum Noise K for Path to Snack

    Data Structures & Algorithms

    Find the maximum value of K for which you can get the snack without disturbing any B's.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Glean recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!