Ph0en1x Notebook

A step forward every day


  • Home

  • Tags

  • Categories

  • Archives

  • Search

LeetCode 454 4Sum II

Posted on 2020-02-10 | In ACM

经典4Sum题,但是需要在4个数组中分别找到一个数来相加

Read more »

LeetCode 456 Pattern

Posted on 2020-02-10 | In ACM

单调栈,找到132这种大小关系的子序列

Read more »

LeetCode 446 Arithmetic Slices II - Subsequence

Posted on 2020-02-07 | In ACM

动态规划,求有多少子序列是等差数列

Read more »

LeetCode 332 Reconstruct Itinerary

Posted on 2019-09-24 | In ACM
给定连通图的一些边,问如何不重复走边遍历完这个图,并且边有一个名字,要使名字的字典序最小
Read more »

LeetCode 330 Patching Array

Posted on 2019-09-22 | In ACM
给定数组和一个整数n,问需要补多少数,使这个数组内数组合的和可以覆盖1~n
Read more »

LeetCode 327 Count of Range Sum

Posted on 2019-09-20 | In ACM
求数组内有多少段区间和落在low和high的闭区间内,要求时间复杂度小于O(n^2)
Read more »

LeetCode 321 Create Maximum Number

Posted on 2019-09-19 | In ACM
给定两个数组,要求用这些数字组成一个长度为k的最大的数字,要求两个数组内的数字顺序不变。
Read more »

LeetCode 324 Wiggle Sort II

Posted on 2019-09-19 | In ACM
摇摆排序,要求nums[0] < nums[1] > nums[2] < nums[3]... 且时间复杂度为O(n),额外空间为O(1)
Read more »

LeetCode 310 Minimum Height Trees

Posted on 2019-09-14 | In ACM
寻找以哪个节点作为根节点的时候树的高度最小。
Read more »

LeetCode 309 Best Time to Buy and Sell Stock with Cooldown

Posted on 2019-09-13 | In ACM
炒股,能够买卖多次,但是每次买完需要等一天才能再次买入,问最多能赚多少钱
Read more »
12…14
Ph0en1x

Ph0en1x

134 posts
13 categories
69 tags
RSS
© 2018 — 2020 Ph0en1x
UV PV