自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 资源 (1)
  • 收藏
  • 关注

原创 leetcode 97. Interleaving String

相关问题Discription Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s1 = “aabcc”, s2 = “dbbca”,When s3 = “aadbbcbcac”, return true. When s3 = “aadbbbacc

2017-10-31 14:35:05 253 1

原创 leetcode 99. Recover Binary Search Tree

相关问题144. Binary Tree Preorder Traversal 94. Binary Tree Inorder Traversal 145. Binary Tree Postorder Traversal99. Recover Binary Search TreeDiscription Two elements of a binary search tree (BST) are

2017-10-31 10:31:34 319

原创 leetcode 25. Reverse Nodes in k-Group

相关问题24. Swap Nodes in Pairs 25. Reverse Nodes in k-GroupDiscription Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less

2017-10-30 19:48:53 220

原创 leetcode 24. Swap Nodes in Pairs

相关问题Discription Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant s

2017-10-30 19:24:40 190

原创 leetcode 23. Merge k Sorted Lists

相关问题Discription Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路最小堆 该题为二路归并的变种,多路归并。使用最小堆结构在log(k)\log(k)时间复杂度内找到当前最小元素。时间复杂度:nlog(k)n\log(k) 空间复杂度

2017-10-30 17:06:42 221

原创 leetcode 22. Generate Parentheses

相关问题Discription 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:[ “((()))”, “(()())”, “(())()

2017-10-30 12:02:33 269

原创 leetcode 19. Remove Nth Node From End of List

相关问题Discription Given a linked list, remove the n-th node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, t

2017-10-29 15:53:50 276

原创 leetcode 454. 4Sum II

相关问题1. Two Sum 15. 3Sum 16. 3Sum Closest 18. 4Sum 454. 4Sum IIDiscription Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k]

2017-10-27 14:40:37 310

原创 leetcode 17. Letter Combinations of a Phone Number

相关问题17. Letter Combinations of a Phone Number 77. CombinationsDiscription Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (j

2017-10-18 22:52:17 166

原创 leetcode 15. 3Sum

相关问题1. Two Sum 15. 3SumDiscription Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The

2017-10-18 21:49:37 226

原创 堆排序

排序

2017-10-17 18:41:07 272

原创 leetcode 407. Trapping Rain Water II

相关问题11. Container With Most Water 42. Trapping Rain Water 407. Trapping Rain Water IIDiscription Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation

2017-10-14 22:10:49 218

原创 leetcode 42. Trapping Rain Water

相关问题 11. Container With Most Water 42. Trapping Rain Water 407. Trapping Rain Water IIDiscription Given n non-negative integers representing an elevation map where the width of each bar is 1, compute

2017-10-14 19:10:40 224

原创 leetcode 11. Container With Most Water

相关问题Discription Given n non-negative integers a1,a2,...,ana_1, a_2, ..., a_n, where each represents a point at coordinate (i,ai)(i, a_i). nn vertical lines are drawn such that the two endpoints of line

2017-10-14 16:55:55 172

原创 leetcode 145. Binary Tree Postorder Traversal

相关问题144. Binary Tree Preorder Traversal 94. Binary Tree Inorder Traversal 145. Binary Tree Postorder TraversalDiscription Given a binary tree, return the postorder traversal of its nodes’ values.For

2017-10-14 16:25:39 260

原创 leetcode 94. Binary Tree Inorder Traversal

相关问题144. Binary Tree Preorder Traversal 94. Binary Tree Inorder Traversal 145. Binary Tree Postorder TraversalDiscription Given a binary tree, return the inorder traversal of its nodes’ values.For ex

2017-10-14 16:10:31 208

原创 leetcode 144. Binary Tree Preorder Traversal

相关问题144. Binary Tree Preorder Traversal 94. Binary Tree Inorder Traversal 145. Binary Tree Postorder TraversalDiscription Given a binary tree, return the preorder traversal of its nodes’ values.For e

2017-10-14 15:59:17 226

原创 leetcode 215. Kth Largest Element in an Array

Discription Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example, Given [3,2,1,5,6,4] and k = 2, ret

2017-10-12 16:43:05 164

原创 leetcode 77. Combinations

Discription Given two integers n and k, return all possible combinations of k numbers out of 1 … n.For example, If n = 4 and k = 2, a solution is:[ [2,4], [3,4], [2,3], [1,2], [1,3],

2017-10-12 15:59:46 241

原创 leetcode 48. Rotate Image

Discription You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note: You have to rotate the image in-place, which means you have to modify the input 2D m

2017-10-12 10:33:20 180

原创 leetcode 47. Permutations II

相关问题leetcode 46. PermutationsDiscription Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example, [1,1,2] have the following unique permutation

2017-10-11 20:20:17 188

原创 leetcode 46. Permutations

Discription Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not us

2017-10-11 16:51:22 184

原创 leetcode 5. Longest Palindromic Substring

Discription Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: “babad”Output: “bab”Note: “aba” is also a valid answer.

2017-10-10 22:06:01 166

原创 leetcode 4. Median of Two Sorted Arrays

Discription There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1: nums1 =

2017-10-09 19:41:17 201

原创 leetcode 3. Longest Substring Without Repeating Characters

Discription Given a string, find the length of the longest substring without repeating characters.Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is “b”,

2017-10-09 19:22:30 197

原创 leetcode 1. Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not us

2017-10-09 17:08:23 194

类似于万年历的小程序

计算从某一时间为起点,经过一定时间后的具体年月日 C++实现,控制台运行,适合初学者学习

2012-06-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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