摘要:
回溯解法,JAVA: public final int numTilePossibilities(String tiles) { Set<String> set = new HashSet<String>(); search(tiles.toCharArray(), "", tiles.length 阅读全文
posted @ 2021-04-18 23:13
牛有肉
阅读(84)
评论(0)
推荐(0)
摘要:
暴力法: public final int maxScoreSightseeingPair(int[] values) { int len = values.length, re = 0; for (int i = 0; i < len; i++) { //剪枝用 int maxJ = 0; for 阅读全文
posted @ 2021-04-18 22:11
牛有肉
阅读(60)
评论(0)
推荐(0)
摘要:
JAVA: public final int numRescueBoats(int[] people, int limit) { if (people == null || people.length == 0) return 0; Arrays.sort(people); int len = pe 阅读全文
posted @ 2021-04-18 14:37
牛有肉
阅读(66)
评论(0)
推荐(0)

浙公网安备 33010602011771号