摘要:
用max heap // use maxHeap. Put entry into maxHeap so we can always poll a number with largest frequency public class Solution { public List<Integer> to 阅读全文
posted @ 2022-05-02 05:52
苗妙苗
阅读(87)
评论(0)
推荐(0)
摘要:
太麻烦了只好用Backtracking public List<List<Integer>> fourSum(int[] nums, int target) { List<List<Integer>> ans = new ArrayList<List<Integer>>(); if(nums == 阅读全文
posted @ 2022-05-02 05:38
苗妙苗
阅读(28)
评论(0)
推荐(0)
摘要:
参考:https://www.geeksforgeeks.org/print-all-root-to-leaf-paths-of-an-n-ary-tree/ // Java program for the above approach import java.util.ArrayList; cla 阅读全文
posted @ 2022-05-02 03:03
苗妙苗
阅读(165)
评论(0)
推荐(0)