Daily iOS
CS fundamentals and algorithmsMastercard

Parsing corrupted logs

Your app writes a network log file. Each line has the format userID(4 digits) pageName startTime(hh:mm:ss) endTime(hh:mm:ss), but some lines are corrupted. How would you design a function that keeps only valid lines and finds the 2 pages that loaded slowest? How do you handle the broken lines?

Submit