Microsoft Interview Question

Basic of java. complex algo