Google pattern interview task