brief : the quick sort can divide into two steps, the first step is partition, the second step is conquer the subset.i) as the first step, array A[lef...
分类:
其他好文 时间:
2014-10-01 01:21:50
阅读次数:
209
原题地址:https://oj.leetcode.com/problems/merge-k-sorted-lists/题意:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its com...
分类:
编程语言 时间:
2014-10-01 00:32:30
阅读次数:
270
Problem: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 th...
分类:
其他好文 时间:
2014-09-30 23:33:10
阅读次数:
319
This is a note forhttps://class.coursera.org/interactivepython-005In week two, I have learned:1.event-drvien programing4 event types:Input: button, te...
分类:
编程语言 时间:
2014-09-30 23:13:50
阅读次数:
210
Follow up the "remove duplicates",what if duplicates are allowed at most twice?思路一:使用变量numlength记录数组中相同数字出现不超过两次所得到的数组长度;code:class Solution {public: ...
分类:
其他好文 时间:
2014-09-30 23:01:00
阅读次数:
171
[leetcode]Given two sorted integer arrays A and B, merge B into A as one sorted array....
分类:
其他好文 时间:
2014-09-30 11:36:39
阅读次数:
154
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".算法:模拟加法过程 1 class Solution { 2 public: 3 st...
分类:
其他好文 时间:
2014-09-30 11:05:31
阅读次数:
155
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
这个题说数可能是任意的大的非负数,肯定不是让你直接乘起来返回(我干了。。)而是...
分类:
其他好文 时间:
2014-09-30 06:45:32
阅读次数:
167
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-09-30 04:40:32
阅读次数:
182
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
编程语言 时间:
2014-09-30 02:51:41
阅读次数:
394