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)+
  1. Mask the first value with a secret offset.
  2. 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.

Want the full step-by-step worked solution? It's part of Premium — along with a worked solution for every question in the bank.

Asked at: Citadel, Two Sigma

Related questions