Logic being an online exam using multiple arrays and recursion