
面试
文章平均质量分 58
crazyvoice
探险,分享,户外,摄影,阅读。行万里路,读万卷书。在有限的生命中,创造无限可能。
展开
-
0X01下一秒
// YearMonthDay.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>#include <string>using namespace std;void ResetTheTime(int *year, int *month, int *date, int *hour, int *minute, int *second)原创 2011-05-26 21:20:00 · 432 阅读 · 0 评论 -
007字符串之一
// 007.cpp : Defines the entry point for the console application.//#include "stdafx.h"//全部翻转bool AllReverse(char *pBegin, char *原创 2011-09-09 11:32:15 · 560 阅读 · 0 评论 -
字符串循环右移动n位
#include "stdafx.h"#include #include using namespace std;#define MAX_LEN 256//字符串循环右移动n位,如abcdefghi循环右移2位为hiabcdefg//3种方法原创 2011-08-11 10:37:48 · 830 阅读 · 0 评论 -
036-字符串
// 036.cpp : Defines the entry point for the console application.//#include "stdafx.h"void DeleteOneStr(char *pBuffer, char str)原创 2011-09-10 10:44:21 · 487 阅读 · 0 评论 -
046-字符串
// 046.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "string.h"//判断字符串是否对称(起始地址终止地址)原创 2011-09-15 09:13:54 · 426 阅读 · 0 评论 -
排序算法(一)
// PXSF001.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include using namespace std;/******原创 2011-08-19 21:37:53 · 370 阅读 · 0 评论 -
C语言实现单链表的各种操作
#include "stdafx.h"#include using namespace std;struct Node{ int m_nVal; Node *next;};Node *Create(){ bool bFlag =原创 2011-08-19 15:40:58 · 494 阅读 · 0 评论 -
031-从尾到头输出链表
// 031.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include struct ListNode{ int m_nKey;原创 2011-09-25 16:24:36 · 449 阅读 · 0 评论 -
019-翻转列表
// 019.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include struct ListNode{ int m_nKey;原创 2011-09-25 16:37:13 · 586 阅读 · 0 评论 -
009-查找链表中倒数第k个结点
// 009.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include struct ListNode{ int m_nKey;原创 2011-09-25 16:22:38 · 524 阅读 · 0 评论 -
057
// 057.cpp : Defines the entry point for the console application.//#include "stdafx.h"//思路:从0~99岁用一个数组记录年龄出现的次数。数组的下标即年龄。//数组总原创 2011-09-08 16:34:02 · 716 阅读 · 0 评论 -
013-字符串
// 013.cpp : Defines the entry point for the console application.//#include "stdafx.h"//思路:字符的ASCI码值从0到255,设立一个数组用于记录每一个值出现的次数。/原创 2011-09-09 15:46:43 · 368 阅读 · 0 评论 -
034
// 034.cpp : Defines the entry point for the console application.//#include "stdafx.h"//判断数据所给位是否为1bool TheGivePosIs1(int data,原创 2011-09-07 21:33:54 · 398 阅读 · 0 评论 -
029
// 029.cpp : Defines the entry point for the console application.//#include "stdafx.h"bool Reorder(int *pInputData, int len);boo原创 2011-09-06 22:05:25 · 391 阅读 · 0 评论 -
010
// 010.cpp : Defines the entry point for the console application.//#include "stdafx.h"//思路:定义一个头位置,一个尾位置。当两者所代表的数据之和小于sum时候,头位置需要往原创 2011-09-06 21:34:23 · 375 阅读 · 0 评论 -
简洁的字符串连接函数
#include "stdafx.h"void constr(char *f, char *s){ while(*f != 0) { f++; } while((*f++ = *s++) != 0) { }}int m原创 2011-08-10 20:16:30 · 474 阅读 · 0 评论 -
数字转换成字符串
#include "stdafx.h"#include using namespace std;#define MAX_SIZE 256int input;char output[MAX_SIZE];//数字转换成字符串int main(int原创 2011-08-11 09:00:05 · 518 阅读 · 0 评论 -
字符串转换成数字
#include "stdafx.h"#include using namespace std;int StrToNum(const char *str){ if (NULL == str) { return -1; } i原创 2011-08-11 09:21:24 · 348 阅读 · 0 评论 -
040
// 040.cpp : Defines the entry point for the console application.//#include "stdafx.h"bool IsContinue(int *pData, int len, int maxNu原创 2011-09-08 09:30:49 · 366 阅读 · 0 评论 -
042
// 042.cpp : Defines the entry point for the console application.//#include "stdafx.h"/*排好序的数组,前面一段数字放入后面,即旋转。找出旋转后最小数组的最小元素[1,原创 2011-09-08 10:10:16 · 411 阅读 · 0 评论 -
003
// 003.cpp : Defines the entry point for the console application.//#include "stdafx.h"bool FindTheGreatSubSum(int *pdata, int len, i原创 2011-09-06 20:22:57 · 394 阅读 · 0 评论 -
033-在O(1)时间删除链表结点
// 033.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include struct ListNode{ int m_nKey;原创 2011-09-25 16:20:20 · 434 阅读 · 0 评论