努力奔跑中的coder

源代码的github地址:https://github.com/louyuting

[leetcode-动态规划]--96. Unique Binary Search Trees

Question 96. Unique Binary Search Trees Given n, how many structurally unique BST’s (binary search trees) that store values 1…n? For example, ...

2017-02-10 14:05:06

阅读数:393

评论数:0

[leetcode-二叉查找树的修正]--99. Recover Binary Search Tree

Question 99. Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing i...

2017-02-09 15:15:53

阅读数:338

评论数:0

[leetcode-二叉树层次遍历并统计每层节点数]--103. Binary Tree Zigzag Level Order Traversal

Question 103. Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from...

2017-02-09 14:10:30

阅读数:840

评论数:0

[leetcode-二叉树层次遍历并统计每层节点数]--107. Binary Tree Level Order Traversal II

Question 107. Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from ...

2017-02-09 13:35:09

阅读数:945

评论数:0

[leetcode-二叉树层次遍历并统计每层节点数]--102. Binary Tree Level Order Traversal

Question 102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right...

2017-02-09 13:22:07

阅读数:1911

评论数:0

[leetcode-二叉树后序遍历]--145. Binary Tree Postorder Traversal

Question 145. Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes’ values. For example: Given ...

2017-02-09 11:05:10

阅读数:418

评论数:0

[leetcode-二叉树中序遍历]--94. Binary Tree Inorder Traversal

Question 94. Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes’ values. For example: Given binar...

2017-02-09 11:00:47

阅读数:372

评论数:0

[leetcode-二叉树先序遍历]--144.Binary Tree Preorder Traversal

Question 144. Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes’ values. For example: Given bi...

2017-02-09 10:53:29

阅读数:464

评论数:0

[leetcode-查找]--74. Search a 2D Matrix

Question 74. Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties...

2017-02-08 16:53:01

阅读数:216

评论数:0

[leetcode-查找]--35. Search Insert Position

Question 35. Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index wher...

2017-02-08 16:01:29

阅读数:259

评论数:0

[leetcode-二分查找]--34. Search for a Range

Question 34. Search for a Range Given an array of integers sorted in ascending order, find the starting and ending position of a given target value...

2017-02-08 14:49:43

阅读数:426

评论数:0

[leetcode-排序]--75. Sort Colors

Question 75. Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with t...

2017-02-08 12:21:47

阅读数:333

评论数:0

[leetcode-排序]--148. Sort List

Question: 148. Sort List Sort a linked list in O(n log n) time using constant space complexity. 中文:使用恒定的空间复杂度排序一个链表,要求时间复杂度是O(nlogn)

2017-02-05 22:54:20

阅读数:1049

评论数:0

[leetcode-排序]--147. Insertion Sort List

Question147. Insertion Sort List Sort a linked list using insertion sort. 中文:使用插入排序来让链表有序。 解决思路:在新链表的head结点之前构建一个结点,然后将所有的结点依次插入在helper结点之后,最后...

2017-02-05 20:42:33

阅读数:367

评论数:0

[leetcode-排序]--23. Merge k Sorted Lists

Question 23. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 中文:合并k个有序...

2017-02-05 16:57:40

阅读数:325

评论数:0

[leetcode-排序]--21. Merge Two Sorted Lists

Question 21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the...

2017-02-05 16:53:38

阅读数:1803

评论数:1

[leetcode-排序]--88. Merge Sorted Array

Question 88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 中文: 给定两个有序的整型数组nu...

2017-02-05 16:03:33

阅读数:333

评论数:0

[leetcode]--413. Arithmetic Slices

Question 413. Arithmetic Slices A sequence of number is called arithmetic if it consists of at least three elements and if the difference between a...

2017-02-05 14:51:09

阅读数:260

评论数:0

[leetcode]--338. Counting Bits

Question 338. Counting Bits Question: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of...

2017-02-05 14:07:45

阅读数:305

评论数:0

[leetcode]--260. Single Number III

Question 260: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find ...

2017-02-05 12:57:13

阅读数:219

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭