New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Roblox
Coding Question
AI Insights
Quick Summary
Verify if a playlist sequence adheres to a shuffle rule where songs play exactly once per cycle.
Detect invalid duplicates that appear before the entire unique song library is exhausted.
Identify cycle completions to reset the tracking state for the subsequent permutation.
What This Tests
Efficient state tracking using Hash Sets.
Simulating rule-based processes with conditional resets.
Identifying periodic patterns and boundaries in sequences.
Logical validation of constrained input streams.
Common Patterns
Hashing
Simulation
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Accepted
3.4k
/4.7k
Acceptance Rate
72.0%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
allSongs =
playlist =
Output
Expected