Quorum interview question

Write a function for a standard algorithm question