You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
def breaking_records(score): min = max = score[0] min_count = max_count = 0 for i in score[1:]: if i > max: max_count += 1 max = i if i < min: min_count += 1 min = i return max_count, min_count n = int(input()) score = list(map(int, input().split())) print(*breaking_records(score))
Feel free to ask if you have any questions :)
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
Feel free to ask if you have any questions :)