曾经遇到一个问题: 有一个文件,其中每一行都记录了存在好友关系的两个人的userId。现要分析此文件,从两两朋友关系的记录中,找出所有的:三人中任意两人互为好友,即三角好友的存在,并打印出来 当时现场没有写出来。最近尝试编写了下,抛去读取文件等基础工作,先实现了三角好友关系查找的实现,编写代码如下: /*** Created by leisu on
Alice is a big fan of volleyball and especially of the very strong “Team A”. Volleyball match consists of up to five sets. During each set teams score one point for winning a ball. The first four set