2016年4月26日

排序1,2......n的无序数组,时间复杂度为o(n),空间复杂度为o(1)

摘要: #include "stdafx.h" #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int a[] = { 10, 6, 9, 5, 2, 8, 4, 7, 1, 3 }; int len = sizeof(a) / sizeof(int); int temp; fo... 阅读全文

posted @ 2016-04-26 15:56 !!-阳光-!! 阅读(447) 评论(0) 推荐(0) 编辑

sprintf、strcpy 及 memcpy 函数区别

摘要: 这些函数的区别在于 实现功能 以及 操作对象 不同。strcpy 函数操作的对象是 字符串 ,完成 从 源字符串 到 目的字符串 的 拷贝 功能。 sprintf 函数操作的对象 不限于字符串 :虽然目的对象是字符串,但是源对象可以是字符串、也可以是任意基本类型的数据。这个函数主要用来实现(字符串或 阅读全文

posted @ 2016-04-26 14:27 !!-阳光-!! 阅读(1192) 评论(0) 推荐(0) 编辑

导航