摘要:On a mysterious island there are creatures known as Quxes which come in three colors: red, green, and blue. One power of the Qux is that if two of the 阅读全文
posted @ 2019-09-14 03:21 lz87 阅读 (5) 评论 (0) 编辑
摘要:Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[rig 阅读全文
posted @ 2019-09-04 23:28 lz87 阅读 (20) 评论 (0) 编辑
摘要:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2019-08-30 06:46 lz87 阅读 (7) 评论 (0) 编辑
摘要:mplement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the given leng 阅读全文
posted @ 2019-08-07 12:06 lz87 阅读 (84) 评论 (0) 编辑
摘要:A cryptarithmetic puzzle is a mathematical game where the digits of some numbers are represented by letters. Each letter represents a unique digit. Fo 阅读全文
posted @ 2019-08-06 10:17 lz87 阅读 (17) 评论 (0) 编辑
摘要:There are N courses, labelled from 1 to N. We are given relations[i] = [X, Y], representing a prerequisite relationship between course Xand course Y:  阅读全文
posted @ 2019-08-01 10:15 lz87 阅读 (91) 评论 (0) 编辑
摘要:Given a non-decreasing array of positive integers nums and an integer K, find out if this array can be divided into one or more disjoint increasing su 阅读全文
posted @ 2019-07-15 22:11 lz87 阅读 (105) 评论 (0) 编辑
摘要:Typically, an implementation of in-order traversal of a binary tree has O(h) space complexity, where h is the height of the tree. Write a program to c 阅读全文
posted @ 2019-07-10 22:40 lz87 阅读 (21) 评论 (0) 编辑
摘要:Given a sorted array of non-negative integers, find the smallest positive integer that is not the sum of a subset of the array. For example, for the i 阅读全文
posted @ 2019-07-10 11:43 lz87 阅读 (18) 评论 (0) 编辑
摘要:LeetCode 424. Longest Repeating Character Replacement Given a string that consists of only uppercase English letters, you can replace any letter in th 阅读全文
posted @ 2019-04-13 03:48 lz87 阅读 (41) 评论 (0) 编辑