Create Solution_Bit.java

A bit manipulation approach. Also cache the results.