摘要: 基本思想:通过一趟排序将待排列记录分割成独立的两部分,其中的一部分均比另一部分小,然后分别对这两个部分进行排序,使整个序列有序。可选择第一个记录pivotkey作为枢纽,设置两个指针low和high,初值分别为low和high。首先从high所指的位置向前搜索找到第一个比pivotkey小的值,并且... 阅读全文
posted @ 2015-05-24 21:17 wy1290939507 阅读(322) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2015-05-24 18:37 wy1290939507 阅读(124) 评论(0) 推荐(0) 编辑