Spotify SDE OA 2025 | Perfect Playlist Duration & Smart Shuffle Algorithm
Question · Posted Jun 2026
Problem 1 - Perfect Playlist Duration Problem Statement You are given an integer array durations representing song durations. The array may contain negative values due to crossfade adjustments. You are also given an integer target. Return the total number of contiguous playlists whose sum is exactly equal to target. Constraints Constraint 1 ≤ durations.length ≤ 105 -109 ≤ durations[i] ≤ 109 -109 ≤ target ≤ 109 Test Case Input Output durations = [30,-10,40,20,-10,30] target = 60 3 Problem 2 - ...
The full answer & interview discussion are available to premium members.
Log in Create a free account