Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:
其他好文 时间:
2019-06-14 16:30:22
阅读次数:
96
Given an integer, write a function to determine if it is a power of two. Example 1: Example 2: Example 3: 题目大意: 判断一个整数是否为2的幂次方。 理 解: 2的幂 的二进制表示中只有一位是1 ...
分类:
其他好文 时间:
2019-06-14 12:38:33
阅读次数:
96
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the ...
分类:
其他好文 时间:
2019-06-13 20:27:21
阅读次数:
120
Bootstrap 实例 - 基本的胶囊式导航菜单 基本的胶囊式导航菜单 Home SVN iOS 胶囊1对应的内容: one 胶囊2对应的内容:two 胶囊3对应的内容:three ... ...
分类:
其他好文 时间:
2019-06-13 15:41:26
阅读次数:
101
一、课堂代码敲一遍 此处省略,内容可参考课堂记录 ps:选中 Ctrl+/ 注释 Crtl+d 复制当行内容 Tab 往右四个空格 Shift+tab 往左减四个空格 二、课堂记录 数据类型剩余的内置方法 列表类型内置方法 https://www.cnblogs.com/kermitjam/p/10 ...
分类:
其他好文 时间:
2019-06-13 00:51:31
阅读次数:
104
传送门 D. Divide by three, multiply by two ?题意 给你一个数 x,x 可以执行以下两种操作中的一种得到数 y: y 再执行上述两种操作的一种得到数 z; 接着对 z 得到...... 这样依次执行了 n-1 次会得到 n 个数; 现在给你这 n 个数,让你按照上 ...
分类:
其他好文 时间:
2019-06-11 22:10:48
阅读次数:
125
D. Ehab and the Expected XOR Problem Given two integers n and x, construct an array that satisfies the following conditions: for any element ai in the ...
分类:
其他好文 时间:
2019-06-11 00:52:20
阅读次数:
124
ARTS 具体要求: 1.每周至少做一个 leetcode 的算法题2.阅读并点评至少一篇英文技术文章3.学习至少一个技术技巧4.分享一篇有观点和思考的技术文章 1、Algorithm Two Sum Given an array of integers, return indices of the ...
分类:
其他好文 时间:
2019-06-10 18:47:40
阅读次数:
134
概述 java.util.Arrays 此类包含用来操作数组的各种方法,比如排序和搜索等。其所有方法均为静态方法,调用起来非常简单。 操作数组的方法 public static String toString(数组) :返回指定数组内容的字符串表示形式。 public static void sor ...
分类:
其他好文 时间:
2019-06-10 00:05:29
阅读次数:
97