CARPL interview question

Questions on stack, binary search etc