摘要:
42. 接雨水 class Solution { public int trap(int[] height) { int size = height.length; int[] left = new int[size]; int[] right = new int[size]; for (int i 阅读全文
摘要:
62. 不同路径 class Solution { public int uniquePaths(int m, int n) { int[][] dep = new int[m][n]; for (int i = 0;i < m;i++){ dep[i][0] = 1; } for (int j = 阅读全文
摘要:
LeetCode23. 合并K个排序链表 /** * 合并K有序链表 ==> 对比归并排序 * * @author Ning */ public class LeetCode23 { public ListNode mergeKLists(ListNode[] lists) { if (lists 阅读全文