Amazon Interview Question

How to find if a a graph is 2-colorable or not? Code it.