- 博客(7)
- 资源 (16)
- 收藏
- 关注
原创 29. Divide Two Integers
1.问题描述 Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 2.解题思路 采用二分法,每次让除数以2倍的形式递增,只要递增结果小于被除数,则继续递增,如果递增时超过了,则记住递增前的数,然后用被除数减去
2016-07-20 19:33:51 390
原创 27. Remove Element
1.问题描述 Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant mem
2016-07-18 20:00:34 258
原创 25. Reverse Nodes in k-Group
1.问题描述 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should rem
2016-07-18 19:12:27 379
原创 23. Merge k Sorted Lists
1.问题描述 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 2.解题思路 类似于2路归并法,将K路归并划为2路归并,直到最后得到一个链表,采用递归的方法 3.代码实现 class Solution { public: ListNo
2016-07-13 11:51:09 373
原创 22.Generate Parentheses
1.问题描述 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()
2016-07-12 14:23:41 307
原创 Merge Two Sorted Lists
1.问题描述 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 2.解题思路 合并两个有序的链表,只需要逐一进行比较即可。 1).刚开始通过比较l1和
2016-07-03 15:07:30 312
原创 Valid Parentheses
1.问题描述 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}"
2016-07-02 20:09:51 286
cxform-c.dll
2017-05-28
c# 采用DirectX9.0 载入3D模型
2015-05-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人