自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 算法概论课后题8.16证明

算法概论8.168.16 We are feeling experimental and want to create a new dish. There are various ingredients we can choose from and we’d like to use as many of them as possible,but some ingredients don’t g

2017-07-05 21:35:38 433

原创 [leetcode]Binary Tree Postorder Traversal

Binary Tree Postorder TraversalDifficulty:HardGiven a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2

2017-07-02 13:24:27 206

原创 [leetcode]Max Points on a Line

Max Points on a LineDifficulty:HardGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.题目就是给定一堆点,判断最多有多少点共线。我的做法是先算数两两点之间的线段一次方程,然后通过判断相同的方程个

2017-06-18 20:05:36 198

原创 [leetcode]Valid Number

Valid NumberValidate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem state

2017-06-01 15:27:05 232

原创 [leetcode]Reverse Linked List II

Reverse Linked List IIDifficulty:MediumReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4

2017-05-25 22:28:38 335

原创 [leetcode]Minimum Window Substring

Minimum Window SubstringDifficulty:HardGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOB

2017-05-21 20:13:18 199

原创 [leetcode]Rotate List

Rotate ListDifficulty:MediumGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL

2017-05-14 12:30:19 193

原创 [leetcode]Edit Distance

Edit DistanceDifficulty:HardGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the follo

2017-05-06 13:40:10 215

原创 [leetcode]Text Justification

Text JustificationDifficulty:HardGiven an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should p

2017-04-30 20:16:07 176

原创 [leetcode]Insert Interval

Insert IntervalDifficulty:hardGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sor

2017-04-23 19:24:22 186

原创 [leetcode]First Missing Positive

First Missing PositiveDifficulty:HardGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algo

2017-04-14 11:23:18 136

原创 [leetcode]Jump Game II

Jump Game IIDifficulty:hardGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump

2017-04-09 18:38:20 174

原创 [leetcode]Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]

2017-04-09 15:54:39 163

原创 DLL接口的简单期限管理

导师让我在提供给别人的DLL接口加上时间限制,所以就试着加了,接口的参数是要读取的文件的路径,所以就通过判断输入的文件的创建和修改时间来实现。time_t 实际上就是long long类型,存储的应该是与1900年直到存储日期的秒数,所以可以提前算出期限时间#include #includeconst long long endline = 1530374340;//2018.

2017-03-23 22:09:06 2262 1

原创 [leetcode]Substring with Concatenation of All Words

Substring with Concatenation of All Wordsdifficulty:hardYou are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in

2017-03-23 20:42:28 276

原创 [leetcode]4Sum

4SumDifficulty:mediunGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum

2017-03-19 14:56:32 219

原创 [leetcode]Reverse Nodes in k-Group

Reverse Nodes in k-GroupDifficulty:HardGiven 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 than or equa

2017-03-09 19:46:05 254

原创 [leetcode]ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2017-02-26 21:28:29 234

原创 [leetcode]Median of Two Sorted Arrays

Median of Two Sorted ArraysDifficulty:HardThere 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 comp

2017-02-26 20:05:41 350

原创 [leetcode]Add Two Numbers

Difficult:MediumYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two nu

2017-02-26 17:39:58 220

空空如也

空空如也

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

TA关注的人

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