Slice | SDE 1 (Backend) | Interview Experience
- Posted
- 12 Apr 2025
Summary
I cold-emailed a recruiter at Slice, secured an interview, and successfully cleared two rounds focusing on Data Structures & Algorithms and System Design, ultimately leading to my selection for the SDE 1 (Backend) role.
How it went
I cold-emailed a recruiter, and luckily, got a call from them the next day itself. The first round of the interview was scheduled for the following day.
Round 1 (1.5 hours) - Problem Solving / DSA
- Given a rows array (containing maximum of each row) of size n and a columns array (containing maximum of each column) of size m. The matrix is not given. Find out the maximum sum of the matrix that can be formed.
Example:rows = [3, 6, 9]columns = [7, 8, 9]
The matrix that can be formed to give the maximum sum is[[3, 3, 3], [6, 6, 6], [7, 8, 9]]
Sum of this matrix = 51 - Given an array of integers, find the closest element on it's right that has a greater frequency than its own frequency.
Similar to Next Greater element, just need to store the pair of frequency and index of each element at each point in the stack.
Time Complexity
Brute force: O(N * M)
Optimised: O(N + M) (ignoring the sort time complexity)
Space Complexity: O(1)
Round 2 (1.5 hours) - DSA + HM
- Parking lot design to allocateSlot and vacateSlot when a car comes in. The parking area has z floors, each floor having x rows and y columns. Entry point is at x = 0, y = 0, z = 0
For simplification, distance from entry point was taken to be x + y + z. If two slots had same distance from the entry point, then the slot with smallest floor number would be considered, followed by column number and row number.
The interviewer asked in-depth questions about my past projects, current work at my company, team leadership experiences, and various behavioral scenarios. Although the interview was initially scheduled for an hour, it extended to 1.5 hours due to the engaging discussion.
I received positive feedback for this round the following day.
Verdict: Selected
Questions asked (3)
- 01
Maximum Sum Matrix from Row/Column Maxima
Data Structures & Algorithms
Given a
rowsarray (containing maximum of each row) of sizenand acolumnsarray (containing maximum of each column) of sizem. The matrix is not given. Find out the maximum sum of the matrix that can be formed.
Example:rows = [3, 6, 9]columns = [7, 8, 9]
The matrix that can be formed to give the maximum sum is[[3, 3, 3], [6, 6, 6], [7, 8, 9]]
Sum of this matrix = 51 - 02
Next Greater Frequency Element
Data Structures & Algorithms
Given an array of integers, find the closest element on it's right that has a greater frequency than its own frequency.
- 03
Parking Lot Design with Priority Allocation
System Design
Parking lot design to allocateSlot and vacateSlot when a car comes in. The parking area has z floors, each floor having x rows and y columns. Entry point is at x = 0, y = 0, z = 0
For simplification, distance from entry point was taken to be x + y + z. If two slots had same distance from the entry point, then the slot with smallest floor number would be considered, followed by column number and row number.