Oracle Interview Question

how to solve logic problems