//_DataStructure_C_Impl:链栈
#include
#include
typedef char DataType;
typedef struct node{
DataType data;
struct node *next;
}LStackNode,*LinkStack;
//将链栈初始化为空。动态生成头结点,并将头结点的指针域置为空
void InitStack(Lin...
分类:
其他好文 时间:
2015-08-04 00:41:11
阅读次数:
98
计数排序是稳定排序,而且是线性时间内的排序算法,时间复杂度是O(n + k)其中k是待排序数组的范围。计数排序不是原址排序,空间复杂度是O(n + k)
//k是指A中的数组范围是0~k 包括0和k
void count_sort(int A[], int B[], int n, int k)
{
int *C = (int *)malloc(sizeof(int) * ...
分类:
编程语言 时间:
2015-08-04 00:39:31
阅读次数:
131
#include#include#include#include#include#includeusing namespace std;#define END "XXXXXX"const int SIZE=10000+16;map dic;void Fun_in(){ string s; ...
分类:
其他好文 时间:
2015-08-04 00:18:49
阅读次数:
169
1 package com.swing.demo; 2 3 import java.io.File; 4 import java.io.IOException; 5 6 public class OpenDirTest { 7 public static void main(Strin...
分类:
编程语言 时间:
2015-08-04 00:14:09
阅读次数:
140
package day03;//运算符演示public class OperDemo {public static void main(String[] args) {/* * 6.条件/三目运算符: * 1)语法: * boolean ? 数1 : 数2 * 2)执行过程: * 计算boolean...
分类:
其他好文 时间:
2015-08-04 00:13:48
阅读次数:
122
#include#include#include#include#includeusing namespace std;const int SIZE=10000+16;char book[SIZE];map dic;void fun_in(){ char start[6]={'\0'}; ...
分类:
其他好文 时间:
2015-08-04 00:13:44
阅读次数:
170
class Queue {private: stack in; stack out; void reverseStackToOut() { auto size = in.size(); for (size_t i = 0; i < size...
分类:
其他好文 时间:
2015-08-04 00:08:11
阅读次数:
127
java中实现多线程的方法有两种:继承Thread类和实现runnable接口 1.继承Thread类,重写父类run()方法 ??public?class?thread1?extends?Thread?{
?
????????public?void?run()?{
???????...
分类:
编程语言 时间:
2015-08-03 23:05:19
阅读次数:
328
//write
using System;
using System.IO;
using System.IO.Pipes;
using System.Security.Principal;
using System.Threading;
namespace memoryWrite
{
class Program
{
static void Main(string...
??
#include
#include
#include
//二叉链表
typedef struct node{
char data;//节点数据元素
struct node *lchild;//指向左孩子
struct node *rchild;//指向右孩子
}BiNode,*BTree;
//利用后序和中序建立二叉树
void GetPreOrder...
分类:
其他好文 时间:
2015-08-03 22:50:42
阅读次数:
176