码迷,mamicode.com
首页 >  
搜索关键字:optimal array multip    ( 29833个结果
LeetCode: Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple...
分类:其他好文   时间:2014-05-23 07:22:48    阅读次数:241
php 验证上传图片尺寸
getimagesize 函数取得图像大小 (PHP 4, PHP 5)array getimagesize ( string filename [, array &imageinfo] ) //注意 ¥imageinfo在使用的时候不在需要前面的&。说明getimagesize() 函数将测定任何...
分类:Web程序   时间:2014-05-23 06:38:23    阅读次数:265
php 实现常用算法
//冒泡排序 从小到大对一组数排序function mp($array){ $count = count($array); if ($count $i; $k--) { if($array[$k] "; } return $...
分类:Web程序   时间:2014-05-23 05:39:26    阅读次数:284
【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-22 16:53:52    阅读次数:173
Single Number
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:其他好文   时间:2014-05-22 16:31:03    阅读次数:194
CRC8算法DELPHI源码
unit Crc8;interfaceUsesClasses, Windows;Function Crc_8n(p : array of BYTE; len : BYTE) : Byte;implementationFunction Crc_8n(p : array of BYTE; len : B...
分类:其他好文   时间:2014-05-22 16:29:09    阅读次数:229
41.把数组排成最小的数
Sort array to min value.
分类:其他好文   时间:2014-05-21 21:03:34    阅读次数:262
【leetcode】Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-05-21 20:00:51    阅读次数:296
Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-21 17:27:55    阅读次数:252
LeetCode: First Missing Positive [040]
【题目】 Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant space. 【题意】 给定一个数组,找出第一个缺失的正数。时间复杂度O(n) ...
分类:其他好文   时间:2014-05-21 17:13:07    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!