摘要:
A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the m 阅读全文
摘要:
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
摘要:
Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
摘要:
We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would c 阅读全文
摘要:
A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return 阅读全文
摘要:
Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[ 阅读全文
摘要:
International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to ".-", "b" map 阅读全文