You are given two integers nn and dd . You need to construct a rooted binary tree consisting of nn vertices with a root at the vertex 11 and the sum o ...
分类:
其他好文 时间:
2020-03-09 10:32:58
阅读次数:
52
What are Peng (Bob) Chi's top 3 strengths? Can you give an example of how one or two of those strengths has impacted you or the business? What are the ...
分类:
其他好文 时间:
2020-03-09 01:41:29
阅读次数:
66
原题链接在这里:https://leetcode.com/problems/product-of-the-last-k-numbers/ 题目: Implement the class ProductOfNumbers that supports two methods: 1. add(int nu ...
分类:
其他好文 时间:
2020-03-08 15:45:52
阅读次数:
64
[TOC] 一.简介 Redis是一个开源的使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存亦可持久化的日志型、Key Value数据库,并提供多种语言的API。它通常被称为数据结构服务器,因为值(value)可以是 字符串(String), 哈希(Hash), 列表(list), 集 ...
分类:
其他好文 时间:
2020-03-08 13:48:25
阅读次数:
68
省选模拟35 1.two 线段树 对于给定的一条边,发现在另一棵树上的删边情况只有两种. $$dfn[u]r$$ 所以把所有边二元组插到另一棵树的两棵线段树里(因为用的是ta的dfn序). 在第一颗线段树u处插v,第二颗v处插u. 查询时查询区间内线段树里一维$ l/ 2.bracket 点分治+F ...
分类:
其他好文 时间:
2020-03-08 09:57:16
阅读次数:
52
名词分两类: 可数名词 是指数得过来的概念 比如:apple , pencil , student. 可数名词数量在两个或两个以上,可数名词要加s,比如 two apples , three pencils , five students 可数名词有单数和复数之分: apple-apples、pen ...
分类:
其他好文 时间:
2020-03-07 20:40:49
阅读次数:
106
将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 `输出:1 1 2 3 4 4` 解法有两种: 1.递归思路 ? 思路很简单,递归首先要考虑 边界情况 ,也就是什么时候停止。当l1走到空时,返回的一定是l2,l2空时同理。 ? 当l1较小时,l1为头结点 ...
分类:
其他好文 时间:
2020-03-07 00:02:15
阅读次数:
78
题目: 给定一个有序整数数组,元素各不相同且按升序排列,编写一个算法,创建一棵高度最小的二叉搜索树。 示例:给定有序数组: [-10,-3,0,5,9], 一个可能的答案是:[0,-3,9,-10,null,5],它可以表示下面这个高度平衡二叉搜索树: 0 / \ -3 9 / / -10 5 分析 ...
分类:
其他好文 时间:
2020-03-06 15:13:39
阅读次数:
73
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident ...
分类:
其他好文 时间:
2020-03-06 15:05:00
阅读次数:
54
[剑指Offer]41 和为S的两个数字 VS 和为S的连续正数序列 Leetcode T1 Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specif ...
分类:
其他好文 时间:
2020-03-06 12:41:24
阅读次数:
59