HackerEarth Interview Question

Based On Array, Bitwise Operators, Trees And Graphs