Uber Software Engineer Interview Experience — a Candy-Crush Matrix and a Fruit-Pair Sliding Window on the OA

Uber·Software Engineer·Sep 2025
Online Assessmentmedium

Questions 1 and 2 were easy, two array questions.

Question 3 was kind of like a match-three game — a matrix where different numbers represent different colors. If a cell has two neighbors (up, down, left, or right) that are the same color as it, they explode and get cleared. After the whole matrix finishes clearing, the cells that weren't cleared fall down. Empty cells are represented by 0. Return the matrix after one round of clearing. A brute force solution passed all the test cases.

I didn't solve question 4. The gist of it: there's an array where each number represents a type of fruit, and you're given a number k representing the minimum number of matching-fruit pairs a subarray needs to have, and you need to find all such subarrays. For example [0, 1, 0, 1, 0], k=2, should return 3, because only [0, 1, 0, 1], [1, 0, 1, 0], and [0, 1, 0, 1, 0] satisfy the condition. As long as there are two of the same fruit anywhere in the window it counts as one pair — more than two of the same fruit still only counts as one pair. I struggled with a sliding window approach for half an hour and still couldn't get it, so in the end I just submitted a brute force solution.

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Uber
Role
Software Engineer
Rounds
Online Assessment
Difficulty
medium
Interview date
Sep 2025
Questions from this interview
2 questions

Real Uber interview experiences

First-hand reports from Uber candidates — the rounds, the questions they were asked, and how it went.

All 53 Uber interview experiences