摘要:
Find all possible combinations of k positive numbers that add up to a number n,each combination should be a unique set of numbers. 阅读全文
摘要:
题目描述: Given an integer n, return the number of trailing zeroes in n!. 题目大意: 给定一个整数n,返回n!(n的阶乘)结果中后缀0的个数(如5!=120,则后缀中0的个数为1)。 解题思路: 首先这是LeetCode中时间复杂度为 阅读全文
摘要:
[转]从头到尾彻底理解KMP http://blog.csdn.net/v_july_v/article/details/7041827 阅读全文
摘要:
1 = 14 = 1 + 39 = 1 + 3 + 516 = 1 + 3 + 5 + 725 = 1 + 3 + 5 + 7 + 936 = 1 + 3 + 5 + 7 + 9 + 11....1+3+...+(2n-1) = (2n-1 + 1)n/2 = n*n 时间复杂度为O(sqrt(n) 阅读全文
摘要:
Web Audio API提供了一个简单强大的机制来实现控制web应用程序的音频内容。它允许你开发复杂的混音,音效,平移以及更多。 可以先看一下MDN的这篇文章《Web Audio API的运用》 https://developer.mozilla.org/zh-CN/docs/Web/API/We 阅读全文
摘要:
文章地址: https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/%E5%90%91%E2%80%9C%E5%BC%B9%E8%B7%B3%E7%90%83%E2%80%9D%E6%BC%94%E7%A4%BA%E7%A8 阅读全文
摘要:
转自:https://www.lijinma.com/blog/2014/05/29/amazing-xor/ 什么是异或? Wikipedia的解释: 在逻辑学中,逻辑算符异或(exclusive or)是对两个运算元的一种逻辑析取类型,符号为 XOR 或 EOR 或 ⊕(编程语言中常用^)。但与 阅读全文
摘要:
1 #define SIZE 1000 //定义Hash table的初始大小 2 struct HashArray 3 { 4 int key; 5 int count; 6 struct HashArray* next; 7 }Hash[SIZE]; //主函数中需要初始化 8 void addHash(int num) ... 阅读全文
摘要:
功能 功能 把格式化的数据写入某个字符缓冲区。 所需头文件 所需头文件 stdio.h 原型 原型 int sprintf( char *buffer, const char *format, [ argument] … ); 参数列表 参数列表 buffer:char型指针,指向将要写入的字符串的 阅读全文
摘要:
将《C程序设计(谭浩强著)》的快速排序样例做了小更改。 qsort()是编译器函数库自带的快速排序函数。 阅读全文