摘要:
回溯解法,JAVA: public final int numTilePossibilities(String tiles) { Set<String> set = new HashSet<String>(); search(tiles.toCharArray(), "", tiles.length 阅读全文
摘要:
暴力法: public final int maxScoreSightseeingPair(int[] values) { int len = values.length, re = 0; for (int i = 0; i < len; i++) { //剪枝用 int maxJ = 0; for 阅读全文
摘要:
JAVA: public final int numRescueBoats(int[] people, int limit) { if (people == null || people.length == 0) return 0; Arrays.sort(people); int len = pe 阅读全文