Apple Interview Question
Software Engineer / DevelopersA simple-minded solution for the multithread part of the code
while there is data in stdin
- for each thread (1 < T)
- read stdin (empty read ok)
- start crypt thread on its local buffer+local key
- rotate key
- next
- for each thread
- join on thread T to finish (order is important!)
- write to stdout (empty buffer ok)
- next
- wend
Such a monstrous problem!!!
- Anonymous January 26, 2010