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.
Full Experience
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.
Interview Questions (3)
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.
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.
Find the maximum value of K for which you can get the snack without disturbing any B's.
Summary
I recently completed a full interview loop for a new grad role at Glean, which included multiple technical screens, a math proof, a low-level design assignment, and a final LeetCode round. Unfortunately, I received a rejection due to not fully meeting expectations on the design assignment.
Full Experience
Hi Leetcode Community,
I wanted to share my interview experience with Glean for their new grad role. I was initially contacted by a recruiter after applying on their career site.
Round 1
My first round was a 1-hour technical screen with an engineer. It focused on LeetCode questions. I was asked: "Given m arrays of size n, how do you find the kth largest element?"
Round 2
I received positive feedback for the first round about two days after my interview. The next step was a 30-minute recruiter call, which covered typical HR questions like "why Glean?" and "why this specific role?".
Round 3
I heard back the very next day that I advanced to the next technical round. This was another 1-hour interview. The first 20 minutes were dedicated to a resume deep dive and discussing projects I had worked on. The remaining time was for a math proof question. I don't recall the exact wording, but I essentially had to prove why the median is the optimal value for balancing an array. This round involved no coding, just writing a proof.
Round 4 (Final Round)
It took about two weeks to get feedback that I made it to the final round. This round consisted of two back-to-back interviews.
Assignment Round
One part was a two-hour assignment round, which was a 5-part low-level design problem. The task was to code a table module from scratch. I started with the basics of adding rows and columns, then moved on to implementing joins. I ran out of time after completing the joins and thus wasn't able to attempt the subsequent parts.
LeetCode Round
The other part was a one-hour LeetCode round, featuring one medium and one hard problem. The first question was: "You're given a sorted array with one element that is out of place. Write a function that sorts the array." The second question was LeetCode 317.
Result
I received a rejection email the day after Round 4. I believe the expectation for the assignment round was to complete at least 4 out of 5 parts, as the feedback indicated I did not meet the expectations for that specific round.
Overall, it was a great experience. The engineers and recruiters were all friendly and responded in a timely manner. Glean is a super cool company, and I might consider applying there again in the future.
Interview Questions (5)
Given m arrays of size n, how do you find the kth largest element?
Prove why the median is the best value for balancing an array. This was a math proof question, with no coding involved.
A 5-part low-level design problem to code up a table module from scratch. I started with the basics of adding rows and columns, then moved on to joins.
You're given a sorted array with one element that is out of place. Write a function that sorts the array.
Preparation Tips
My preparation primarily involved consistent LeetCode practice for the algorithm-focused rounds. For the math proof and low-level design components, I leveraged my general computer science knowledge and experience gained from personal projects.