SDE - 1
Interview Date
—
Result
Not Specified
Difficulty
Medium to Hard (based on coding problems)
Rounds
3 rounds, 3 Coding problems
Drive Type
Full-Time
Topics asked
Detailed experience
College: Not Specified
Interview Date: Not Specified
Interview Type: Full-Time
Result: Not Specified
Difficulty: Medium to Hard (based on coding problems)
Rounds: 3 rounds, 3 Coding problems
Topics Asked: Data Structures, Algorithms (Array manipulation, Dynamic Programming, Stack-based problems), Number theory (factors).
This SDE-1 interview experience mentions 3 rounds and 3 coding problems.
Coding Problem 1: Given an array `ARR`, return an array consisting of '0' and '1' where '0' means that `ARR[index]` does not have 3 factors and '1' means `ARR[index]` has exactly 3 factors. For example, if `ARR = [3, 5, 4, 2]`, the answer is `[0, 0, 1, 0]`.
Coding Problem 2: Find the maximum profit from stock prices. The input `prices` = should yield an output of 11. This involves buying on day 0 and selling on day 1 for a profit of 5, and then buying on day 3 and selling on day 4 for a profit of 6, making a total profit of 11.
Coding Problem 3 (Stock Span Problem): Compute `S[i] = i – h(i)`, where `h(i)` is the closest day preceding `i` such that the price on that day is greater than the price on day `i`. If no such day exists, `h(i) = -1`. This logic is implemented using a stack to store days.