题目如下: Given the root of a binary tree, each node has a value from 0 to 25representing the letters 'a' to 'z': a value of 0 represents 'a', a value of ...
分类:
其他好文 时间:
2019-02-06 15:52:32
阅读次数:
192
https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ You are given two integer arrays nums1 and nums2 sorted in ascending order and an integ ...
分类:
其他好文 时间:
2019-02-06 11:52:53
阅读次数:
118
Q1: Find the smallest way from array: O(n), cannot be improved anymore, because we have to loop though the array once. Q2: Find 2nd smallest value, na ...
分类:
其他好文 时间:
2019-02-06 09:31:06
阅读次数:
211
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z': a value of 0 represents 'a', a value of 1 rep ...
分类:
其他好文 时间:
2019-02-05 13:13:56
阅读次数:
142
题目: 思路: 读完题之后第一时间想到的是尺取法来做这个题,结果让自己写写崩了,还是练得少!! 到网上搜了一下学习了大佬的标记方法,用一个变量来判断是不是都已经出现,要比每次都判断一下快超多。 代码: ...
分类:
其他好文 时间:
2019-02-03 18:05:58
阅读次数:
158
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z': a value of 0 represents 'a', a value of 1repr ...
分类:
其他好文 时间:
2019-02-03 14:11:35
阅读次数:
195
题目要求 Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and add x to A[i]. After this process, we have some ar ...
分类:
其他好文 时间:
2019-02-03 10:42:23
阅读次数:
195
https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ Given a n x n matrix where each of the rows and columns are sorted in ascending ...
分类:
其他好文 时间:
2019-01-30 21:45:57
阅读次数:
190
"943.Find the Shortest Superstring 旅行商问题&状态压缩DP" Given an array A of strings, find any smallest string that contains each string in A as a substring. ...
分类:
其他好文 时间:
2019-01-19 16:19:49
阅读次数:
265