自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 算法设计大作业 8章第3题

题目STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, find a satisfying assignment in which at most k variables are true, if such an as

2017-07-11 09:35:12 1062

原创 2017年6月17日22:32:41 456. 132 Pattern [easy]

Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i j k and ai < ak j. Design an algorithm that takes a list of n numbers as input and check

2017-06-17 22:32:48 199

原创 2017年6月11日22:54:14 539. Minimum Time Difference [medium]

539. Minimum Time DifferenceGiven a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list.Example 1:

2017-06-11 22:55:01 240

原创 2017年6月4日22:08:33 238. Product of Array Except Self 【medium】

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements ofnums except nums[i].Solve it without division

2017-06-04 22:08:36 174

原创 2017年5月28日22:28:47154. Find Minimum in Rotated Sorted Array II

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If foun

2017-05-29 22:28:48 174

原创 2017年5月21日12:35:53354. Russian Doll Envelopes

You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is greater than th

2017-05-22 12:35:53 231

原创 2017年5月14日23:30:35 367. Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function such as sqrt.Example 1:Input: 16Return

2017-05-15 23:31:18 148

原创 2017年5月7日 16:01:40 67. Add Binary【easy】

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".Subscribe to see which companies asked this question.

2017-05-07 16:01:49 495

原创 2017年5月1日13:01:52 389. Find the Difference [easy]

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was

2017-05-01 13:02:24 399

原创 2017年4月23日 448. Find All Numbers Disappeared in an Array[easy]

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.

2017-04-23 16:30:07 125

原创 2017年4月16日21:48:14 88. Merge Sorted Array 【easy】

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold addit

2017-04-16 21:48:30 226

原创 2017年4月9日21:37:54 145. Binary Tree Postorder Traversal 【】hard

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].hard题中很简单的二叉树遍历 /

2017-04-09 21:38:46 164

原创 2017年4月2日 258. Add Digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on

2017-04-02 23:59:50 148

原创 2017.3.19 520. Detect Capital[easy]

Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letters in t

2017-03-19 08:07:40 205

原创 2017.3.12 104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Subscribe to see which compani

2017-03-12 23:22:56 174

原创 2017.3.2 53. Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1] ha

2017-03-02 09:35:13 244

原创 2017.3.2 94. Binary Tree Inorder Traversal [easy]

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2].Note: Recursive solu

2017-03-02 08:58:40 150

原创 2017.2.25 1. Two Sum [easy]

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 use the same 

2017-02-25 13:59:36 299

空空如也

空空如也

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

TA关注的人

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