β back to unit
Medium
# puzzle gauntlet medium
The Playlist Shuffle Check
Your friend swears they only SHUFFLED your playlist. Same songs, same repeats, new order β verify the claim. π§
You get the before list and the after list. Print true shuffle if they hold exactly the same songs the same number of times, otherwise songs changed.
Example:
Input: before = ["hey", "sun", "hey", "rain"], after = ["rain", "hey", "sun", "hey"]
Output: true shuffle
Both lists hold the exact same songs the same number of times (heyΓ2, sunΓ1, rainΓ1) β just reordered.
π‘ need a hint?
pg-playlist-shuffle-check.pyπ given lines are locked β write your code in between
loading...