摘要: ----思路:利用三个队列,一个存3,一个存5,一个存7.然后,3*3的都放第一个。然后3*5,5*5的放第二个。然后,3*7,5*7,7*7的都放第三个。答案: public static int findKth(int k){ ArrayList res = new Arra... 阅读全文
posted @ 2015-12-31 15:13 仔细思考一切 阅读(200) 评论(0) 推荐(0)
摘要: 用^来操作:public static int[] exchangeAB(int[] AB){ AB[0] = AB[0] ^ AB[1]; AB[1] = AB[0] ^ AB[1]; AB[0] = AB[0] ^ AB[1]; retur... 阅读全文
posted @ 2015-12-31 10:45 仔细思考一切 阅读(297) 评论(0) 推荐(0)