摘要: 2 3树 定义 一棵2 3查找树或为一棵空树,或由以下结点组成: 2 结点,含有一个键(及其对应的值)和两条链接。 3 结点,含有两个键(及其对应的值)和三条链接。 2 结点、3 结点的性质均与BST相同或相似。 搜索 与二叉搜索树类似。 插入 向2 结点中插入新键 只需要将键插入2 结点,使之变成 阅读全文
posted @ 2017-08-22 21:03 Aneureka 阅读(264) 评论(0) 推荐(0) 编辑
摘要: Problem Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given t 阅读全文
posted @ 2017-08-22 00:33 Aneureka 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Linux 资料整理:从安装到卸载 下载安装 下载 Ubuntu 16.04:http://releases.ubuntu.com/16.04/ Ubuntu 14.04:http://releases.ubuntu.com/14.04/ 安装(双系统) 工具 EasyUEFI(uefi+gpt), 阅读全文
posted @ 2017-08-10 23:39 Aneureka 阅读(967) 评论(0) 推荐(0) 编辑
摘要: Problem Given a string s , find the longest palindromic substring in s . You may assume that the maximum length of s is 1000. Example Input: "babad" O 阅读全文
posted @ 2017-08-04 16:01 Aneureka 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Problem Given a string, find the length of the longest substring without repeating characters. Example Given "abcabcbb", the answer is "abc", which th 阅读全文
posted @ 2017-08-04 16:00 Aneureka 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem The string is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for bette 阅读全文
posted @ 2017-08-04 15:59 Aneureka 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Description The Hamming Distance Problem Thinking 枚举排列问题,从左到右递归处理。 Answer c++ include using namespace std; int ds; int N, H; int count(int A, int num, 阅读全文
posted @ 2017-08-04 15:57 Aneureka 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Thinking 贪心 + 二分 Answer c++ include include using namespace std; int k; // the amount of items struct item{ long long price; long long pos; }; bool co 阅读全文
posted @ 2017-08-04 15:54 Aneureka 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 define MAX 阅读全文
posted @ 2017-08-02 16:09 Aneureka 阅读(118) 评论(1) 推荐(0) 编辑