Apple Core OS Sensors Team
Round 1:
First we talked about my past projects, then he gave me a problem to solve on the board.
Question: Let's say you have a sensor that can generate data with the frequency of H1. Design me an API where your clients can get that information in their own preferred frequencies (h1, h2, ...). Make any assumptions you like about the API. Pseudo code is okay.
Round 2:
Question: Let's say we have a clock that allows us to read from it. The clock value is 64 bits. The lower half, and upper half of the value are stored at two different registers. Write me some code that allows us to read the time from those registers.
Catch: while you read from each half, the other half might overflow....
Solution: Read the upper half twice, and see if it rolled over...