Add solutions to problems 21 to 24

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