题目描述:
LeetCode 337. House Robber III
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent ...
LeetCode 337. House Robber III
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent ...
使用泛型的冒泡排序Java代码:
public class SortUtils {
public static <T extends Comparable<? super T>> void bubbleSort(T[] nums) {
int size = nums.length;
for (int k = 0; k < size; k++) {
for (int i = 0; i + k + 1 < size; i++) {
if (nums[i ...
LeetCode 336. Palindrome Pairs
Given a list of unique words. Find all pairs of indices (i, j)
in the given list, so that the concatenation of the two words, i.e. words[i] + words[j]
is a palindrome.
Example ...