Pergunta de entrevista da empresa Squash Apps

Write a java program to [1,1,2] Yes and [1,2,2] No.