235. Lowest Common Ancestor of a Binary Search Tree Easy Easy Easy Given a binary search tree (BST), find the lowest common ancestor (LCA) of two give ...
分类:
其他好文 时间:
2019-10-27 18:33:31
阅读次数:
62
You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each pl ...
分类:
其他好文 时间:
2019-10-27 17:09:51
阅读次数:
88
1、Find memory used by an object 2、Combine a list of strings into a single string 3、Find elements that exist in either of the two lists 4、Track frequen ...
分类:
编程语言 时间:
2019-10-27 16:39:49
阅读次数:
93
传送门 "Luogu" 解题思路 考虑如何 $\text{DP}$ 为了方便处理,我们设 $A B$ 设 $dp[i]$ 表示处理完 $1...i$ ,并且第 $i$ 个数放入关于 $A$ 的集合中的方案。 转移就只需要枚举前一个数 $j$ 就好了。 但是观察到 $N \le 10^5$ ,我们就需 ...
分类:
其他好文 时间:
2019-10-27 10:48:42
阅读次数:
82
231. Power of Two Easy Easy Easy Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation ...
分类:
其他好文 时间:
2019-10-25 13:39:27
阅读次数:
112
MetriKit是iOS 13中用于收集和处理电池和性能指标的新框架。这是在WWDC今年与XCTestMetrics和Xcode Metrics组织者一起,作为一项协调一致的努力的一部分,为开发人员带来关于他们的应用程序在该领域的表现的新见解。 苹果会自动从AppStore上安装的应用程序中收集度量 ...
分类:
移动开发 时间:
2019-10-24 15:53:35
阅读次数:
341
Booth's multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in two's complement notation. The algorithm w ...
分类:
其他好文 时间:
2019-10-23 22:03:59
阅读次数:
98
题目描述: Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of t ...
分类:
其他好文 时间:
2019-10-22 20:12:40
阅读次数:
106
#server层 import socketserver import json import hashlib def zhuce(): pass class MySocket(socketserver.BaseRequestHandler): def handle(self): sor = b'w... ...
分类:
其他好文 时间:
2019-10-22 13:01:34
阅读次数:
66
LintCode 81. Data Stream Median (Hard)思路: 用一个大根堆保存较小的一半数, 一个小根堆保存较大的一半数. 每次根据num和两个堆顶的数据决定往哪个堆里面放. 放完后进行平衡确保两个堆的size差不超过1. 利用两个堆的size和堆顶值计算median.大根堆可... ...
分类:
其他好文 时间:
2019-10-22 10:30:20
阅读次数:
68