231. Power of Two(2的幂) 链接 https://leetcode cn.com/problems/power of two 题目 给定一个整数,编写一个函数来判断它是否是 2 的幂次方。 示例?1: 输入: 1 输出: true 解释: 20?= 1 示例 2: 输入: 16 输 ...
分类:
其他好文 时间:
2020-01-04 16:34:47
阅读次数:
56
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
分类:
其他好文 时间:
2020-01-04 14:40:32
阅读次数:
74
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-01-04 14:37:15
阅读次数:
81
ABC059D "Alice & Brown" In this game, there are two piles initially consisting of $X$ and $Y$ stones, respectively. Alice and Brown alternately perfor ...
分类:
其他好文 时间:
2020-01-04 01:17:34
阅读次数:
62
###Add Two Number本来是一道非常简单的题目原题目的意思是,给两个链表,两个链表都链尾是十进制的头部例如有链表形式 9->8->7 对应的十进制就是789,而后的操作时将两个链表相加并且合并到一个链表里面 ###第一次的解法我第一次是被结构体卡住了,才考研完,很多基础知识全忘了,比如构 ...
分类:
其他好文 时间:
2020-01-03 21:04:15
阅读次数:
79
可以直接用+ assert 'ab' == 'a' + 'b' 支持多行 def aMultilineString = '''line one line two line three''' out: Fri Jan 03 11:14:58 CST 2020: INFO: line oneline t ...
分类:
其他好文 时间:
2020-01-03 12:11:58
阅读次数:
105
题目 来源:力扣(LeetCode) 描述 我们提供了一个类: 三个不同的线程将会共用一个 Foo 实例。 线程 A 将会调用 one() 方法 线程 B 将会调用 two() 方法 线程 C 将会调用 three() 方法 请设计修改程序,以确保 two() 方法在 one() 方法之后被执行,t ...
分类:
其他好文 时间:
2020-01-02 15:40:57
阅读次数:
90
1.原题: https://leetcode.com/problems/minimum-time-visiting-all-points/ On a plane there are n points with integer coordinates points[i] = [xi, yi]. You ...
分类:
其他好文 时间:
2020-01-01 20:46:44
阅读次数:
73
You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu ...
分类:
其他好文 时间:
2020-01-01 13:29:36
阅读次数:
62
我们在开发页面时,会遇到pt、px、em、rem这四种单位。下面介绍一下这四个单位。 1.pt,英文为points,绝对长度单位,意为磅。设计软件zeplin所用的单位就是pt。现在很少使用这个单位了。 2.px,英文为pixel,相对长度单位,意为像素。是相对于屏幕分辨率的单位,国内主流单位。 3 ...
分类:
其他好文 时间:
2019-12-31 23:34:05
阅读次数:
77