自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Gregzeng的博客

找工作orz

  • 博客(9)
  • 收藏
  • 关注

原创 文章标题

LeetCode - Trapping Rain Water问题描述https://leetcode.com/problems/trapping-rain-water/ 大意是给定一系列堆积方块,求当下雨的时候这些方块组成的凹槽能够容纳多少水。解答这道题是经同学推荐尝试的。最早我想到的是一个比较直接的O(n2)O(n^2)的算法:从左到右每列方块进行循环(外层循环),这个需要O(n)O(n)的时间

2016-12-24 10:17:16 395

原创 《Algorithms》NP-complete 部分证明习题解答

《Algorithms》NP-complete 部分证明习题解答8.3STINGY 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 variabl

2016-12-19 17:15:53 2058

原创 LeetCode - Best Time To Buy and Sell Stock Series (I, II, III, IV, with Cooldown)

LeetCode - Best Time to Buy and Sell Stock 系列 解题报告本文记录笔者在解LeetCode上的Best Time to Buy and Sell Stock系列时的一些想法。该系列题目共有五道,它们背景相似,但因为条件限制不同,解决思路也不太相同。I Best Time to Buy and Sell Stock https://leet

2016-10-23 18:08:26 564

原创 LeetCode 410 - Split Array Largest Sum

410. Split Array Largest Sum问题描述 Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize

2016-10-20 22:29:46 492

原创 LeetCode 312 - Burst Balloons

LeetCode 312 - Burst Balloons题目 Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you bur

2016-09-11 17:19:16 522

原创 LeetCode 241 - Different Ways to Add Parentheses

LeetCode 241 - Different Ways to Add Parentheses LeetCode 241 - Different Ways to Add Parentheses Given a string of numbers and operators, return all possible results from computing all the differ

2016-09-09 00:51:18 339

原创 LeetCode 23 - Merge k Sorted Lists

LeetCode 23 - Merge k Sorted Lists LeetCode 23 - Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

2016-09-09 00:50:51 285

原创 LeetCode 2 - Add Two Numbers

问题简述 Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the tw

2016-09-06 19:33:45 294

原创 LeetCode 1 - Two Sum

问题简述 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.

2016-09-06 19:23:40 251

空空如也

空空如也

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

TA关注的人

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