摘要:
1.冒泡排序void bubblesort(int num[],const int len){ if (len i; j--) { if (num[j] num[i + 1]) { temp = num[... 阅读全文
摘要:
1.求字符串中连续出现最多的字串pair substring(const string& str){ int i, j, k, len = str.length(), count, maxcount = 1; string substr; vector substrs; //... 阅读全文
摘要:
因为64位下INT_MAX其长度不超过20,故此处将字符串数组传递进函数。int num2str(int num,char str[]){ char c; int i=0, j=0, k=0, tmp = num > 0 ? num : -1 * num; if (num > IN... 阅读全文
摘要:
void * memcpy(void * dst, const void * src, size_t count){ void *res=dst; while (count--) { *(char*)dst = *(char*)src; dst = (... 阅读全文
摘要:
const char* strstr(const char *str, const char* substr){ int i, j, temp; for (i = 0; str[i] != '\0'; i++) { j = 0; temp = i; //... 阅读全文
摘要:
1.TCP/IP协议的体系结构包含四层:应用层(负责应用程序的网络服务,通过端口号识别各个不同的进程)-》传输层(传输控制层协议TCP、用户数据报协议UDP、互联网控制消息协议ICMP)-》网络层-》网络接口层(负责将二进制流转换成数据帧,并进行数据帧的发送和接收)-》硬件层。2.服务器是指能在网络... 阅读全文
摘要:
Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6... 阅读全文
摘要:
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2 -> 3 -> ... 阅读全文
摘要:
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.【罗马数字】1~9: {"I", "II", "III", "IV", "V", "VI... 阅读全文
摘要:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文