2018年12月31日

Leetcode 778. Swim in Rising Water

摘要: Problem: On an N x N grid, each square grid[i][j] represents the elevation at that point (i,j). Now rain starts to fall. At time t, the depth of the w 阅读全文

posted @ 2018-12-31 06:35 周浩炜 阅读(221) 评论(0) 推荐(0) 编辑

Leetcode 719. Find K-th Smallest Pair Distance

摘要: Problem: Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pair (A, B) is defined as the absolute diffe 阅读全文

posted @ 2018-12-31 05:37 周浩炜 阅读(138) 评论(0) 推荐(0) 编辑

2018年12月30日

Leetcode 774. Minimize Max Distance to Gas Station

摘要: Problem: On a horizontal number line, we have gas stations at positions stations[0], stations[1], ..., stations[N-1], where N = stations.length. Now, 阅读全文

posted @ 2018-12-30 11:25 周浩炜 阅读(472) 评论(0) 推荐(0) 编辑

Leetcode 316. Remove Duplicate Letters

摘要: Problem: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make 阅读全文

posted @ 2018-12-30 06:58 周浩炜 阅读(170) 评论(0) 推荐(0) 编辑

SQL Index

摘要: SQL Index 阅读全文

posted @ 2018-12-30 06:06 周浩炜 阅读(189) 评论(0) 推荐(0) 编辑

Leetcode 619. Biggest Single Number

摘要: Problem: Table number contains many numbers in column num including duplicated ones. Can you write a SQL query to find the biggest number, which only 阅读全文

posted @ 2018-12-30 06:03 周浩炜 阅读(588) 评论(0) 推荐(0) 编辑

2018年12月29日

Leetcode 915. Partition Array into Disjoint Intervals

摘要: Problem: Given an array A, partition it into two (contiguous) subarrays left and right so that: Every element in left is less than or equal to every e 阅读全文

posted @ 2018-12-29 14:38 周浩炜 阅读(203) 评论(0) 推荐(0) 编辑

Leetcode Index

摘要: 序: 用于记录刷题过程中难度较大或思路怪异的题目,对于常规难度一般的题就不写入我的博客了,关于效率仅是提交时击败的百分比,可能会随时间波动,仅供参考,算法优劣以时间复杂度和空间复杂度为基准。欢迎留言讨论。 阅读全文

posted @ 2018-12-29 14:26 周浩炜 阅读(256) 评论(0) 推荐(0) 编辑

Leetcode 685. Redundant Connection II

摘要: Problem: In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants 阅读全文

posted @ 2018-12-29 11:26 周浩炜 阅读(163) 评论(0) 推荐(0) 编辑

2018年12月27日

Leetcode 188. Best Time to Buy and Sell Stock IV

摘要: Problem: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You m 阅读全文

posted @ 2018-12-27 16:02 周浩炜 阅读(144) 评论(0) 推荐(0) 编辑

导航