Skip to content

rishabhgist/breaking-the-records

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breaking The Record

Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game establish her record for the season, and she begins counting from there.

HackerRank - Problem

Example

scores = [12,24,10,24]

Scores are in the same order as the games played. She tabulates her results as follows:

Input:

9
10 5 20 20 4 5 2 25 1

Output:

2 4

Explanation 0

The diagram below depicts the number of times Maria broke her best and worst records throughout the season:

She broke her best record twice (after games 2and 7) and her worst record four times (after games 1,4 ,6 ,8 and ), so we print 2 4 as our answer. Note that she did not break her record for best score during game , as her score during that game was not strictly greater than her best record at the time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages