Company: Nvidia_29thjune
Difficulty: medium
Count User Logins A company tracks usage of its mobile app by recording, for every login, who logged in, at what time, and on what date. The raw feed is noisy: some records are truncated, some carry extra fields, and some hold values that are not legal times, dates or usernames at all. You are given the feed as a list of records. Each record is a list of strings that is meant to look like ["username", "login_time", "login_date"] . Discard every record that is not valid, then report, for each user and each date, how many times that user logged in on that date. Validation A record is valid only when all of the following hold. Every other record is ignored completely. It contains exactly three fields. Records with zero, one, two, four or more fields are invalid. The username is the literal text user followed by one or more decimal digits — user0 , user7 , user42 , user007 . The bare string user is invalid, and so are User1 , userA , user-1 and user1x . Leading zeros are kept as written: u