My first round just finished: one coding question and one bug-fixing question. The coding question: you are given a binary string log containing only 0 and 1, where 1 means the service is healthy and 0 means the service is down. You are allowed at most one maintenance operation, where you pick a contiguous substring of length exactly k and change all the 0s in it to 1 (the 1s stay as they are). By choosing the maintenance interval wisely, you want the longest run of consecutive 1s in the string after the operation to be as long as possible, and you return that maximum length. I think it's just a variant of the longest substring problem, so I got it accepted without much trouble.
The work simulation is such a pain... a pile of work scenarios... you run into some really abstract coworkers... and you have to think about how best to reply to their emails... but I guess this stuff has no standard answer, you just fill it in as you see fit.
Discussion
Loading comments…