[LeetCode] Valid Square 验证正方形

 Given the coordinates of four points in 2D space, return whether the four points could construct a square.The coordinate (x,y) of a point is rep

[LeetCode] Longest Line of Consecutive One in Matrix 矩阵中最长的连续1

 Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diago

[LeetCode] Longest Harmonious Subsequence 最长和谐子序列

 We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given

[LeetCode] Split Concatenated Strings 分割串联字符串

 Given a list of strings, you could concatenate these strings together into a loop, where for each string you could choose to reverse it or not.

[LeetCode] Optimal Division 最优分隔

 Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4.However, you

[LeetCode] Shortest Unsorted Continuous Subarray 最短无序连续子数组

 Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whol

[LeetCode] Student Attendance Record II 学生出勤记录之二

 Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer

[LeetCode] Binary Tree Longest Consecutive Sequence II 二叉树最长连续序列之二

 Given a binary tree, you need to find the length of Longest Consecutive Path in Binary Tree.Especially, this path can be either increasing or de

LeetCode Binary Search Summary 二分搜索法小结


[LeetCode] Split Array with Equal Sum 分割数组成和相同的子数组

 Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies following conditions:0 < i, i + 1 < j, j