- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 单链表的反向
给定单链表的头指针Head,可以将链表反向,一种方法利用指针直接赋值,一种借助stack先进后出的特性 #includeiostream>#includestack>using namespace std;struct node...{ int i; node* next;};void reverse1(node** head)...{ node* p1; no
2007-09-23 19:49:00 3008
原创 字符串中最大子串问题
输入一个字符串,输出其最大子串长度,即子串中任两个字符不相同 。本程序只能输入字母,空格以及逗号,并且不区分大小写,输出为第一个具有最大长度的子串以及其长度。 #includeiostream>#includestring>using namespace std;int chartoi(char c)...{ if(isalnum(c)) ...{
2007-09-23 13:14:00 1297
原创 螺旋矩阵
输入一个坐标值,输出其对应的数字void rotate1(int& x,int& y){ if(abs(x)==abs(y)) { if(x>=0&&y>=0) --x; else if(x>=0&&y ++y; else if(x ++x; else --y; } else if(abs(x)>abs(y)) { if(x>0)
2007-09-13 23:59:00 744
原创 Lvalues and Rvalues(转载)
C and C++ enforce subtle differences on the expressions to the left and right of the assignment operator If youve been programming in either C or C++ for a while, its likely that youve heard
2007-09-08 12:14:00 1482
Memory Management: Algorithms and Implementation in C/C++
2008-12-07
XML Schema
2008-10-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人