NopSec interview question

Three programming questions are asked. The first two is quite basic while the third one is a bit tricky.