码迷,mamicode.com
首页 >  
搜索关键字:sparse array    ( 29791个结果
4Sum
Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ...
分类:其他好文   时间:2014-06-29 15:08:56    阅读次数:263
遍历文件
public function findfile($arr) { $files = array(); foreach ($arr as $file) { $child = glob($file."/*"); ...
分类:其他好文   时间:2014-06-29 15:05:49    阅读次数:200
jQuery的getText()方法源码
/** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getTex...
分类:Web程序   时间:2014-06-07 03:37:39    阅读次数:240
笔试算法题(43):布隆过滤器(Bloom Filter)
议题:布隆过滤器(Bloom Filter)分析:BF由一个很长的二进制向量和一系列随机映射的函数组成,通过多个Hash函数将一个元素映射到一个Bit Array中的多个点,查询的时候仅当所有的映射点都为1才能判断元素存在于集合内;BF用于检索一个元素是否在一个集合中,记忆集合求交集;优点是空间 和...
分类:其他好文   时间:2014-05-29 00:18:07    阅读次数:324
LeetCode123:Best Time to Buy and Sell Stock III
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:其他好文   时间:2014-05-28 22:37:18    阅读次数:327
leetcode -- 3sum
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:其他好文   时间:2014-05-28 16:47:30    阅读次数:308
设计一个函数,找出整型数组元素的最大值
/*设计一个函数,找出整型数组元素的最大值*/#includeintmaxOfArray(intarray[],intlength){//数组当做函数参数传递时,会当做指针变量来使用,指针变量在64bit编译器环境下,占据8个字节//intsize=sizeof(array);//printf("a...
分类:其他好文   时间:2014-05-28 16:32:39    阅读次数:223
分享python分析wave, pcm音频文件
最近研究的,我用的是python3.3, 用matplotlib画图,下面代码演示分析pcm文件,如果是wave文件,把wave的文件头去掉就是pcm文件了。代码如下 1 # -*- coding:utf-8 -*- 2 3 import array 4 import os 5 from matp....
分类:编程语言   时间:2014-05-28 04:39:05    阅读次数:495
LeetCode121:Best Time to Buy and Sell Stock
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac...
分类:其他好文   时间:2014-05-28 00:55:20    阅读次数:288
LeetCode122:Best Time to Buy and Sell Stock II
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:其他好文   时间:2014-05-28 00:53:26    阅读次数:338
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!