Question d’entretien chez Two Sigma

Two intermediate level C++ programming problems.