Oracle interview question

how to solve logic problems