Mitsogo interview question

Pattern programming pyramid space pattern, logical questions