Add solutions to problems 21 to 23

Signed-off-by: Yann Stadnicki <y.stadnicki@criteo.com>