is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
The problem looks a little abstract, there probably should be some clarification questions that would affect the answer.
For example what exactly "song" means here (just a media file or a media file + separate metadata or something else) or what other features our player should have (should it have music searching or classifying by artist/genre, etc.) are there any space limitations, can we change the data structure, should our player stop after playing all the songs, etc.
Here's a solution, assuming that music is stored on a file system and our player just takes an array of file paths as input (or we can recursively find those file paths from a given directory instead) and plays files randomly one by one and then stop. O(n) time, O(1) space, Python 2.
- alopatindev March 20, 2016