Write a program to sort a stack in ascending order (with biggest items on top). You may use at most one additional stack to hold items, but you may no...
                            
                            
                                分类:
其他好文   时间:
2014-07-16 20:35:03   
                                阅读次数:
288
                             
                    
                        
                            
                            
                                1 #include 2 #include 3 #include 4 #include 5 #include 6 7 typedef void (__stdcall *P_WALK_DIR_CALLBACK)(const std::string &In_strFilePath); 8 ...
                            
                            
                                分类:
编程语言   时间:
2014-07-16 19:31:47   
                                阅读次数:
256
                             
                    
                        
                            
                            
                                考查代码能力的题目。也可以说是算法水题,呵呵。
推荐新手练习代码能力。
要增加难度就使用纯C实现一下stack,那么就有点难度了,可以使用数组模拟环形栈。做多了,我就直接使用STL了。
#include 
#include 
#include 
#include 
using namespace std;
int main()
{
	stack forward;
	stack ba...
                            
                            
                                分类:
Web程序   时间:
2014-07-14 13:44:44   
                                阅读次数:
149
                             
                    
                        
                            
                            
                                在Java中Stack类表示后进先出(LIFO)的对象堆栈。栈是一种非常常见的数据结构,它采用典型的先进后出的操作方式完成的。每一个栈都包含一个栈顶,每次出栈是将栈顶的数据取出,如下:        Stack通过五个操作对Vector进行扩展,允许将向量视为堆栈。这个五个操作如下:            操作                                          说明...
                            
                            
                                分类:
编程语言   时间:
2014-07-14 13:41:28   
                                阅读次数:
273
                             
                    
                        
                            
                            
                                前面LZ已经充分介绍了有关于List接口的大部分知识,如ArrayList、LinkedList、Vector、Stack,通过这几个知识点可以对List接口有了比较深的了解了。只有通过归纳总结的知识才是你的知识。所以下面LZ就List接口做一个总结。推荐阅读:         java提高篇(二一)-----ArrayList         java提高篇(二二)-----LinkedList...
                            
                            
                                分类:
编程语言   时间:
2014-07-14 13:24:55   
                                阅读次数:
328
                             
                    
                        
                            
                            
                                前面LZ已经充分介绍了有关于List接口的大部分知识,如ArrayList、LinkedList、Vector、Stack,通过这几个知识点可以对List接口有了比较深的了解了。只有通过归纳总结的知识才是你的知识。所以下面LZ就List接口做一个总结。推荐阅读: java提高篇(二一)-----.....
                            
                            
                                分类:
编程语言   时间:
2014-07-13 22:20:01   
                                阅读次数:
334
                             
                    
                        
                            
                            
                                Parentheses Balance题意:括号匹配#include #include int main(int argc, char *argv[]){ char ch, stack[200]; int i = 0, flag = 0, n, j; scanf("%d%*c", ...
                            
                            
                                分类:
其他好文   时间:
2014-07-13 20:01:12   
                                阅读次数:
195
                             
                    
                        
                            
                            
                                写c++程序时我们经常会把函数的定义写在xxx.h中,把函数的实现写在xxx.cpp, 但是当我们写带模版的函数和类时,这样写
就会出现问题,如下:
stack.h
//stack.h
#ifndef STACK_HPP
#define STACK_HPP
#include 
#include 
template>
class CStack
{
public:
	void push(co...
                            
                            
                                分类:
其他好文   时间:
2014-07-13 18:30:56   
                                阅读次数:
214
                             
                    
                        
                            
                            
                                Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d
 & %I64u
Submit Status
Description
How far can you make a stack of cards overhang a table? If you have one card, yo...
                            
                            
                                分类:
其他好文   时间:
2014-07-13 18:24:15   
                                阅读次数:
365
                             
                    
                        
                            
                            
                                Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即C....
                            
                            
                                分类:
其他好文   时间:
2014-07-13 12:59:24   
                                阅读次数:
242