摘要:
N couples sit in 2N seats arranged in a row and want to hold hands. We want to know the minimum number of swaps so that every couple is sitting side b 阅读全文
摘要:
Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warme 阅读全文
摘要:
Given an integer, return its base 7 string representation. Example 1: Example 2: Note: The input will be in range of [-1e7, 1e7]. 给一个整数,返回它的七进制数。 解法1: 阅读全文
摘要:
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
摘要:
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp 阅读全文
摘要:
Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects 阅读全文
摘要:
In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascend 阅读全文
摘要:
Print a binary tree in an m*n 2D string array following these rules: Example 1: Example 2: Example 3: Note: The height of binary tree is in the range 阅读全文
摘要:
Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: Construct the maximum tree by the given array a 阅读全文
摘要:
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 给一个非空二叉树,返回每层的平均值组成的数组。 解 阅读全文