原创 [LeetCode] (hard) 218. The Skyline Problem

https://leetcode.com/problems/the-skyline-problem/ A city's skyline is the outer contour of the silhouette formed by a

原创 [LeetCode] (medium) 658. Find K Closest Elements

https://leetcode.com/problems/find-k-closest-elements/ Given a sorted array, two integers k and x, find the kclosest e

原创 [LeetCode] (medium) 659. Split Array into Consecutive Subsequences

https://leetcode.com/problems/split-array-into-consecutive-subsequences/ You are given an integer array sorted in asce

原创 [LeetCode] (medium) 654. Maximum Binary Tree

https://leetcode.com/problems/maximum-binary-tree/ Given an integer array with no duplicates. A maximum tree building

原创 [LeetCode] (medium) 672. Bulb Switcher II

https://leetcode.com/problems/bulb-switcher-ii/ There is a room with n lights which are turned on initially and 4 butt

原创 [LeetCode] (medium) 523. Continuous Subarray Sum

https://leetcode.com/problems/continuous-subarray-sum/ Given a list of non-negative numbers and a target integer k, wr

原创 [LeetCode] (medium) 692. Top K Frequent Words

https://leetcode.com/problems/top-k-frequent-words/ Given a non-empty list of words, return the k most frequent elemen

原创 [LeetCode] (medium) 650. 2 Keys Keyboard

https://leetcode.com/problems/2-keys-keyboard/ Initially on a notepad only one character 'A' is present. You can perfo

原创 [LeetCode] (medium) 684. Redundant Connection

https://leetcode.com/problems/redundant-connection/ In this problem, a tree is an undirected graph that is connected a

原创 [LeetCode] (medium) 519. Random Flip Matrix

https://leetcode.com/problems/random-flip-matrix/ You are given the number of rows n_rows and number of columns n_cols

原创 [LeetCode] (medium) 516. Longest Palindromic Subsequence

https://leetcode.com/problems/longest-palindromic-subsequence/ Given a string s, find the longest palindromic subseque

原创 [LeetCode] (medium) 593. Valid Square

https://leetcode.com/problems/valid-square/ Given the coordinates of four points in 2D space, return whether the four

原创 [LeetCode] (medium) 667. Beautiful Arrangement II

https://leetcode.com/problems/beautiful-arrangement-ii/ Given two integers n and k, you need to construct a list which

原创 [LeetCode] (medium) 467. Unique Substrings in Wraparound String

https://leetcode.com/problems/unique-substrings-in-wraparound-string/ Consider the string s to be the infinite wraparo

原创 [LeetCode] (medium) 464. Can I Win

https://leetcode.com/problems/can-i-win/ In the "100 game," two players take turns adding, to a running total, any int