Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-10-08 21:27:26
阅读次数:
186
n积分m文章无向边它输出一个哈密顿电路#include #include #include using namespace std;const int N = 155;int n, m;bool mp[N][N];int S, T, top, Stack[N];bool vis[N];void _r...
分类:
其他好文 时间:
2015-10-08 16:15:35
阅读次数:
166
#include#include#include#include#include#define MAXSIZE 100typedef struct{ char elem[MAXSIZE]; int top; int low; int flag; //1是数字,2是字母,3是符号}Stack;char...
分类:
其他好文 时间:
2015-10-08 16:10:01
阅读次数:
153
QuestionDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() --...
分类:
其他好文 时间:
2015-10-08 09:04:41
阅读次数:
193
/************************************************************************* > File Name: stack_queue.cpp > Author: xinyang > Mail: xuechen.xy@...
分类:
编程语言 时间:
2015-10-07 16:07:41
阅读次数:
252
#include#include#include#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OvERFLOW -2#define STACK_INIT_SIZE 100 /....
分类:
其他好文 时间:
2015-10-05 18:06:18
阅读次数:
154
上面代码实现了Stack的isEmpty(),isFull(),clear(),push(),pop(),peek()方法。顺序栈,必须要同时检查下溢出(underflow)和上溢出(overflow)。public class Stack { private int[] stack; ...
分类:
编程语言 时间:
2015-10-05 16:50:49
阅读次数:
184
题目:静态查询区间第k大.主席树入门题目,之前看的很多资料一上来就是动态区间第k大,看得很费劲,后来找了个写得清晰的,感觉静态的还不算难,代码也不长./** @author: Cwind*///#pragma comment(linker, "/STACK:102400000,102400000"....
分类:
其他好文 时间:
2015-10-04 20:52:42
阅读次数:
262
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:
其他好文 时间:
2015-10-04 11:08:11
阅读次数:
141
Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"class Solution {pu...
分类:
其他好文 时间:
2015-10-04 08:53:26
阅读次数:
144