字典树
#ifndef TIRE_H_INCLUDED
#define TIRE_H_INCLUDED
/*
** 字典树
*/
#define MAX 26
typedef struct Node
{
int num;
struct Node* next[MAX];
}Tire;
/*
** 创建一个节点
*/
Tire* create(void);
/*
*...
分类:
其他好文 时间:
2014-05-16 02:52:23
阅读次数:
246
线段树
#ifndef LINETREE_H_INCLUDED
#define LINETREE_H_INCLUDED
typedef struct Node
{
int i, j; // 表示线段树区间[i, j]
int cover; // 表示区间被覆盖的次数
stru...
分类:
其他好文 时间:
2014-05-16 01:54:46
阅读次数:
234
【题目】
原文:
1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one...
分类:
其他好文 时间:
2014-05-16 01:50:08
阅读次数:
311
题目1:Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie,...
分类:
其他好文 时间:
2014-05-16 01:46:15
阅读次数:
460
1、Oracle Enterprise Linux 和 iSCSI 上构建 Oracle
RAC 11g 集群2、Oracle RAC 的所有共享磁盘存储将基于iSCSI,iSCSI 使用在第三个节点(该节点在本文中称为网络存储服务器)上运行的
Openfiler 2.3 版 x86_643、每个 ...
分类:
数据库 时间:
2014-05-16 00:38:04
阅读次数:
489
原题:
题目解析:这个问题的实质是要我们按成访问二叉树的结点,并返回每层访问的结果,这里要求走Z字,其实就是一行正向一行反向。
/*
the kernel idea is visit a binary search tree in level and
the additional work we have to label the end of one level.
*/
v...
分类:
其他好文 时间:
2014-05-15 23:18:46
阅读次数:
515
原理都很简单,关键是某些边界能否正确写对:
#include
#include
using namespace std;
class Node {
public:
int val;
Node* next;
Node(int val = 0):val(val),next(NULL){
}
};
Node* quicksort(Node* head, Node* tai...
分类:
其他好文 时间:
2014-05-15 20:27:36
阅读次数:
296
Populating Next Right Pointers in Each Node...
分类:
其他好文 时间:
2014-05-15 19:29:18
阅读次数:
349
介绍ViewFlipper
ViewFlipper
Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip betwee...
分类:
其他好文 时间:
2014-05-15 18:37:44
阅读次数:
356
5道题目分别是:【Triangle】、【Pascal's Triangle】、【Pascal's Triangle II 】、【Populating Next Right Pointers in Each Node 】、【Populating Next Right Pointers in Each Node II】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录...
分类:
其他好文 时间:
2014-05-15 18:19:07
阅读次数:
272