摘要:
1、私有化构造器,不能直接创建,调用方法创建对象; 2、饿汉式:instance在类装载时就实例化 3、静态内部类: 阅读全文
摘要:
1、 Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. For [1, -1, -2, 1], return -3 2、 1、只需要求出最小值 2、利用su 阅读全文
摘要:
不大懂 1、 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its 阅读全文
摘要:
没搞懂 1、 Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the ne 阅读全文
摘要:
1、 Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of 阅读全文
摘要:
1、 Given two sorted integer arrays A and B, merge B into A as one sorted array. A = [1, 2, 3, empty, empty], B = [4, 5] After merge, A will be filled 阅读全文
摘要:
1、 Merge two given sorted integer array A and B into a new sorted integer array. A=[1,2,3,4] B=[2,4,5,6] return [1,2,2,3,4,4,5,6] 2、思路 1、创建一个大集合 2、判断, 阅读全文
摘要:
1、 Given a collection of intervals, merge all overlapping intervals. 阅读全文