Company: HSBC_5sep
Difficulty: medium
Minimum Gym Membership Cards Problem Description A gym membership card allows entry for a one-week period that always begins on a Monday and ends on the following Sunday. Ellis attends the gym at most once a day. You are given a list visits of length N that records the days of the week on which Ellis visits the gym, in chronological order. Only the day of the week is recorded, not the date, so any number of days may pass between two consecutive visits. Find the minimum number of gym membership cards Ellis has to purchase so that every visit falls inside the week of a card she owns. Complete the function solution(visits) , where visits is the list of N day names. It returns the minimum number of cards. Input Format Read from standard input. N visits[0] visits[1] ... visits[N-1] Line 1 contains the integer N , the number of visits. Line 2 contains N day names separated by single spaces, in chronological order. (inferred -- the source defines only the function solution(visits) ; this two-