随笔分类 -  算法分析与设计

算法分析与设计作业 - LeetCode
摘要:375. Guess Number Higher or Lower II We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which numbe 阅读全文
posted @ 2017-12-04 16:00 JerryChan31 阅读(107) 评论(0) 推荐(0) 编辑
摘要:Week13 376. Wiggle Subsequence A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate betw 阅读全文
posted @ 2017-11-27 13:20 JerryChan31 阅读(103) 评论(0) 推荐(0) 编辑
摘要:Week 12 673.Number of Longest Increasing Subsequence Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1 阅读全文
posted @ 2017-11-21 18:31 JerryChan31 阅读(110) 评论(0) 推荐(0) 编辑
摘要:Week 11 343.Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those intege 阅读全文
posted @ 2017-11-16 15:48 JerryChan31 阅读(95) 评论(0) 推荐(0) 编辑
摘要:474. Ones and Zeroes In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, su 阅读全文
posted @ 2017-11-10 11:06 JerryChan31 阅读(170) 评论(0) 推荐(0) 编辑
摘要:638.Shopping Offers Medium In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, an 阅读全文
posted @ 2017-11-03 16:53 JerryChan31 阅读(92) 评论(0) 推荐(0) 编辑
摘要:338.Counting Bits Medium Given a non negative integer number num . For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their b 阅读全文
posted @ 2017-10-28 20:35 JerryChan31 阅读(88) 评论(0) 推荐(0) 编辑
摘要:714. Best Time to Buy and Sell Stock with Transaction Fee Medium Your are given an array of integers , for which the th element is the price of a give 阅读全文
posted @ 2017-10-21 21:27 JerryChan31 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Week6 676.Implement Magic Dictionary Implement a magic directory with buildDict, and search methods. For the method buildDict, you'll be given a list 阅读全文
posted @ 2017-10-19 14:58 JerryChan31 阅读(205) 评论(0) 推荐(0) 编辑
摘要:529.Minesweeper Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents a 阅读全文
posted @ 2017-10-10 23:28 JerryChan31 阅读(172) 评论(0) 推荐(0) 编辑
摘要:500.Keyboard Row & 557.Reverse Words in a String III 500.Keyboard Row Given a List of words, return the words that can be typed using letters of alpha 阅读全文
posted @ 2017-10-10 18:52 JerryChan31 阅读(137) 评论(0) 推荐(0) 编辑
摘要:Week3 397. Integer Replacement 397.Integer Replacement Medium Given a positive integer n and you can do operations as follow: 1.If n is even, replace 阅读全文
posted @ 2017-09-24 18:34 JerryChan31 阅读(160) 评论(0) 推荐(0) 编辑
摘要:Week2 669. Trim a Binary Search Tree & 617. Merge Two Binary Trees 669.Trim a Binary Search Tree Given a binary search tree and the lowest and highest 阅读全文
posted @ 2017-09-17 23:54 JerryChan31 阅读(127) 评论(0) 推荐(0) 编辑
摘要:这周刚开始讲了一点Divide and Conquer的算法,于是这周的作业就选择在LeetCode上找分治法相关的题目来做。 169.Majority Element Given an array of size n, find the majority element. The majority 阅读全文
posted @ 2017-09-10 22:25 JerryChan31 阅读(143) 评论(0) 推荐(0) 编辑