Average salary, kept private
A group of colleagues wants to compute their average salary without anyone learning any individual's salary. With no trusted third party, how can they do it?
Show hints (2)+
- Mask the first value with a secret offset.
- Pass a running sum around and remove the offset at the end.
Answer
This is an open-ended question - work through it and compare your reasoning.
Create a free account to see the full worked solution and track your progress.
Interview format: Hedge Fund Quant, Systematic & Data-Driven Trading