Radio DJ helper function
Description:
The Problem
James is a DJ at a local radio station. As it's getting to the top of the hour, he needs to find a song to play that will be short enough to fit in before the news block. He's got a database of songs that he'd like you to help him filter in order to do that.
What To Do
Create longestPossible
(longest_possible
in python and ruby) helper function that takes 1 integer argument which is a maximum length of a song in seconds.
songs
is an array of objects which are formatted as follows:
{'artist': 'Artist', 'title': 'Title String', 'playback': '04:30'}
You can expect playback value to be formatted exactly like above.
Output should be a title of the longest song from the database that matches the criteria of not being longer than specified time. If there's no songs matching criteria in the database, return false
.
Similar Kata:
Stats:
Created | Oct 12, 2015 |
Published | Oct 12, 2015 |
Warriors Trained | 1737 |
Total Skips | 90 |
Total Code Submissions | 5694 |
Total Times Completed | 855 |
JavaScript Completions | 375 |
Python Completions | 436 |
Ruby Completions | 81 |
Total Stars | 29 |
% of votes with a positive feedback rating | 89% of 183 |
Total "Very Satisfied" Votes | 151 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 8 |