Jane Street interview question

Two combinatorics/probability questions.