题目来源 Full Binary Tree Description In computer science,a binary tree is a tree data structure in which each node has at most two children. Consider an ...
分类:
其他好文 时间:
2021-04-13 12:02:15
阅读次数:
0
给定 $n$ 个数字,要划分成 $A,B$ 两个集合。要求对任意 $x$,若 $x$ 在 $A$ 中则 $a-x$ 也在 $A$ 中,若 $x$ 在 $B$ 中则 $b-x$ 也在 $B$ 中。保证数互不相同。 ...
分类:
其他好文 时间:
2021-04-06 14:31:06
阅读次数:
0
02 add two numbers 1. 题目讲解 给定两个链表,每个链表表示一个整数,求这两个整数之和。结果也还是用链表表示。 2. 题解 思路: ? 本质上这道题是两个数带进位的加法。两个对应位置上的和是和对10取余。进位则是和整除10. class Solution { public: Li ...
分类:
其他好文 时间:
2021-04-06 14:12:17
阅读次数:
0
Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. ...
分类:
其他好文 时间:
2021-03-18 14:32:17
阅读次数:
0
The land is for sale in CyberCity, and is divided into several pieces. Here it is assumed that each piece of land has exactly two neighboring pieces, ...
分类:
其他好文 时间:
2021-03-11 19:32:24
阅读次数:
0
Reverse Linked List II 反转链表 Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list ...
分类:
编程语言 时间:
2021-03-10 13:27:14
阅读次数:
0
We have a collection of stones, each stone?has a positive integer weight. Each turn, we choose the two?heaviest?stones?and smash them together. Suppos ...
分类:
其他好文 时间:
2021-03-02 12:02:57
阅读次数:
0
description: There are two strings \(a\), \(b\) with the length \(n\), and \(m\). Find the Array <\(p_1, p_2, ..., p_m>\), such that \(a_{p_i}= b_i\), ...
分类:
其他好文 时间:
2021-03-01 13:26:32
阅读次数:
0
Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where ...
分类:
其他好文 时间:
2021-02-22 12:38:24
阅读次数:
0
Given an array of non negative integers, return the maximum sum of elements in two non overlapping (contiguous) subarrays, which have lengths and . (F ...
分类:
移动开发 时间:
2021-02-18 12:53:23
阅读次数:
0