Code RoomPlaylist contains requirements
EasyPrep Room Coding #455

Playlist contains requirements

CodingAlgorithms & data structuresEntry–Mid~10 min

Before publishing a themed playlist, an editor checks it against a requirements list of must-include song ids. The playlist satisfies the requirements when every id in the requirements list appears somewhere in the playlist; repeats in either list are irrelevant, and an empty requirements list is trivially satisfied. Given the playlist and the requirements (both lists of song id strings), return true if the playlist contains every required song and false otherwise. For example, playlist ["a", "b", "c"] satisfies requirements ["c", "a"] but not ["a", "d"].

Implement
contains_all(playlist: list[str], required: list[str]) → bool
Examples
in[["a","b","c"],["c","a"]]outtrue
in[["a","b"],["a","d"]]outfalse
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

0:00 of about 10 min
InputExpectedGot
[["a","b","c"],["c","a"]]truenot run yetsample
[["a","b"],["a","d"]]falsenot run yetsample