上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: Given an array A[] and a number x, check for pair in A[] with sum as xhttp://www.geeksforgeeks.org/write-a-c-program-that-given-a-set-a-of-n-numbers-and-another-number-x-determines-whether-or-not-there-exist-two-elements-in-s-whose-sum-is-exactly-x/ public int[] twoSum(int[] numbers, int target) ... 阅读全文
posted @ 2013-05-20 17:22 Alan Yang 阅读(210) 评论(1) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction of using extra space.You could also try reversing an integer. However, if you have solved 阅读全文
posted @ 2013-05-20 14:45 Alan Yang 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.//Time complexity O(n), auxi 阅读全文
posted @ 2013-05-17 16:22 Alan Yang 阅读(154) 评论(2) 推荐(0) 编辑
摘要: Maximum difference between two elementsFrom http://www.geeksforgeeks.org/maximum-difference-between-two-elements/April 10, 2010Given an array arr[] of integers, find out the difference between any two elementssuch that larger element appears after the smaller number in arr[].Examples: If array is [2 阅读全文
posted @ 2013-05-17 14:58 Alan Yang 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each row is greater than the last integer of the previous row.For example,Consider the following m 阅读全文
posted @ 2013-05-17 00:18 Alan Yang 阅读(315) 评论(0) 推荐(0) 编辑
摘要: From http://blog.csdn.net/java060515/article/details/1545000Author:java060515这两款JAVA IDE都是一流的开源软件,那么对于广大的JAVA学习者及开发人员来说,那款更适合自己呢?本文通过图文对这两款软件进行多方面的分析比较,仅供参考之用,以期让广大的JAVA学习者少走弯路而已。1. 简介NetBeans:在2000年6月由Sun公司开源,其项目包括两个系统:NetBeans IDE,一个开源的集成开发环境(IDE);NetBeans Platform,一个应用程序的通用框架。我们说的NetBeans一般指其IDE。 阅读全文
posted @ 2013-04-01 16:19 Alan Yang 阅读(316) 评论(0) 推荐(0) 编辑
摘要: From:http://www.cnblogs.com/ider/archive/2012/04/01/binary_search.html在学习算法的过程中,我们除了要了解某个算法的基本原理、实现方式,更重要的一个环节是利用big-O理论来分析算法的复杂度。在时间复杂度和空间复杂度之间,我们又会更注重时间复杂度。时间复杂度按优劣排差不多集中在:O(1), O(log n), O(n), O(n log n), O(n2), O(nk), O(2n)到目前位置,似乎我学到的算法中,时间复杂度是O(log n),好像就数二分查找法,其他的诸如排序算法都是 O(n log n)或者O(n2)。但是 阅读全文
posted @ 2013-03-26 18:17 Alan Yang 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Random 种子问题From: http://www.cnblogs.com/shenqiboy/archive/2012/03/19/2405839.html1:随机数生成器类 Random 是 .NET 的伪随机数生成器,要生成各种类型的随机数,必须先得到它的实例对象,然后再生成随机数2:种子随机数的生成是从种子值开始。 如果反复使用同一个种子,就会生成相同的数字系列,产生不同序列的一种方法是使种子值与时间相关3:对象实例默认情况下,Random 类的无参数构造函数使用系统时钟生成其种子值参数化构造函数可提供一个 Int32 类型的数字为起始值4:生成方案方案1:只实例化一个对象,多次方 阅读全文
posted @ 2012-12-05 10:34 Alan Yang 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 国内各大互联网公司相关技术站点-不完全收录利用闲暇时间整理了一份国内各大互联网公司的相关技术站点,希望能够对大家有所帮助,也欢迎各位帮忙补充。腾讯系列(11) 淘宝系列(8) 阿里巴巴系列(3) 支付宝系列(3) 搜狐系列(3) 新浪系列(2) 百度系列(3) 其他(10)腾讯系列财付通TID 财付通设计中心QQ邮箱博客QQ客户端团队博客微信博客腾讯Web前端 AlloyTeam 腾讯Web前端团队 – TAT(Tencent Alloy Team)TGideas游戏设计 腾讯游戏专业设计团队GDC游戏设计 QQ游戏设计中心WSD 用户体验 ECD电商用户体验 腾讯电商用户体验设计部CDC用. 阅读全文
posted @ 2012-11-12 16:15 Alan Yang 阅读(175) 评论(0) 推荐(0) 编辑
摘要: From: http://www.karaszi.com/SQLServer/info_dont_shrink.aspOverviewIf you want the really short story, then check out this analogy - hopefully you come back here and read the full story. Introduced in SQL Server 7.0 was the ability automatically grow and to shrink the physical size of database data 阅读全文
posted @ 2012-10-24 11:01 Alan Yang 阅读(265) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页