142. O(1)时间检测2的幂次 用 O(1) 时间检测整数 n 是否是 2 的幂次。 样例 Example 1: Input: 4 Output: true Example 2: Input: 5 Output: false 挑战 O(1) time 第一种方法:&的方法 class Solut ...
分类:
其他好文 时间:
2020-01-15 12:02:20
阅读次数:
46
有效的回文。题意很简单,验证给的input是否是一个有效的回文。例子, Example 1: Input: "A man, a plan, a canal: Panama" Output: true Example 2: Input: "race a car" Output: false 思路也很简 ...
分类:
其他好文 时间:
2020-01-15 09:24:11
阅读次数:
51
最长的回文子串。题意是给一个字符串,请输出其中最长的回文子串。例子 Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: "cbbd" Output: "bb" 这个 ...
分类:
其他好文 时间:
2020-01-15 09:23:40
阅读次数:
66
Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: ...
分类:
其他好文 时间:
2020-01-14 12:56:57
阅读次数:
59
寻找最小最左叶子节点的值。题意是给一个二叉树,请return最底层,最靠左边节点的值。例子 Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 6 / 7 Output: 7 Note: You ma ...
分类:
其他好文 时间:
2020-01-14 09:45:41
阅读次数:
51
最长无重复字符的子串。 题意是给一个input字符串,请输出其最长的,没有重复字符的substring。这是two pointer/sliding window的基础题。例子 Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-14 09:18:01
阅读次数:
72
CoreArchitecturebitsDMIPS/MHzDMIPS/MHz* ARM11 v7-A 32 1.25 Cortex-A7 v7-A 32 1.9 1.9 Cortex-A8 v7-A 32 2.0 2.0 Cortex-A9 v7-A 32 2.0 2.5 Cortex-A15 v7 ...
分类:
其他好文 时间:
2020-01-13 16:20:58
阅读次数:
420
Guess-the-Number su-ctf-quals-2014 使用jd-gui 反编译jar import java.math.BigInteger; public class guess { static String XOR(String _str_one, String _str_tw ...
分类:
其他好文 时间:
2020-01-13 12:44:50
阅读次数:
341
二叉树的路径和。题意是给一个二叉树和一个数字sum。求是否有这样一条路径可以使得二叉树从根节点到叶子节点经过的所有的节点值之和等于sum。此题可以用BFS和DFS两种做法解决,时间和空间复杂度都是O(n)。例子如下, Example: Given the below binary tree and ...
分类:
其他好文 时间:
2020-01-12 15:04:09
阅读次数:
65
1.初级排序算法 1.1我们关注的主要对象为重拍数组元素的算法。,其中每个元素有个主键,将主键按照某种方式排列。在java中元素通常都是对象,对主键描述往往通过comparable接口。 一般排序模板 public class Example{ public static void sort(Com ...
分类:
编程语言 时间:
2020-01-12 14:59:26
阅读次数:
92