Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-05-25 10:54:39
阅读次数:
51
1039 Course List for Student (25分) Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the cours ...
分类:
其他好文 时间:
2020-05-25 00:25:57
阅读次数:
66
1038 Recover the Smallest Number (30分) Given a collection of number segments, you are supposed to recover the smallest number from them. For example, ...
分类:
编程语言 时间:
2020-05-25 00:13:01
阅读次数:
66
地址 https://leetcode-cn.com/contest/weekly-contest-190/problems/maximum-number-of-vowels-in-a-substring-of-given-length/ 题目描述 给你字符串 s 和整数 k 。 请返回字符串 s ...
分类:
其他好文 时间:
2020-05-24 13:29:42
阅读次数:
169
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:
其他好文 时间:
2020-05-24 11:27:13
阅读次数:
52
Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two interval li ...
分类:
其他好文 时间:
2020-05-24 09:40:12
阅读次数:
58
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all ...
分类:
其他好文 时间:
2020-05-24 00:24:06
阅读次数:
58
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty strin ...
分类:
其他好文 时间:
2020-05-23 09:55:43
阅读次数:
57
[抄题]: Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You ...
分类:
其他好文 时间:
2020-05-23 09:45:44
阅读次数:
50
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi ...
分类:
其他好文 时间:
2020-05-23 00:36:39
阅读次数:
45