The phone screen was over google hangouts plus a code sharing site. The first part of the interview was general knowledge. Again, this is front end. What is cross site scripting. The difference between GET and POST. How to optimize a page with a ton of DOM nodes. Then it was coding.
You're given a javascript object like below. You're asked to go through the days and add up all the pageviews, uniques. Find day that had the most and least traffic. Then you're asked to find the 7 days where the traffic was highest. The interviewer, even keeled yet uncharasmatic, offered that it was a sliding window problem. (edit, 7 consecutive days)
I just don't have enough leetcode experience to do it. Front end devs really need to drop more hints on what is out there. Hope this helps someone.
const daysAndTraffic = {
'01-01-2020': {
'ios': { unique: 123, pageviews: 456 }
'android': { unique: 345, pageviews: 789 }
}
'01-02-2020': {
'ios': { unique: 1234, pageviews: 4567 }
'android': { unique: 3456, pageviews: 6789 }
}
}