Weikoi

导航

2020年3月9日 #

Leetcode-018-四数之和

摘要: 和三数之和思路一样,先排序,再双指针。 class Solution { public List<List<Integer>> fourSum(int[] nums, int target) { Arrays.sort(nums); List<List<Integer>> res = new Arr 阅读全文

posted @ 2020-03-09 23:40 Weikoi 阅读(109) 评论(0) 推荐(0) 编辑

Leetcode-017-电话号码的字母组合

摘要: 全排列问题。 class Solution { public List<String> letterCombinations(String digits) { Map<Character, String> dict = new HashMap<>(); dict.put('2', "abc"); d 阅读全文

posted @ 2020-03-09 01:30 Weikoi 阅读(140) 评论(0) 推荐(0) 编辑