- 博客(15)
- 收藏
- 关注
原创 【LeetCode】504. Base 7【E】【94】
Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: -7 Output: "-10" Note: The input will be in range of [-1e7, 1e
2017-02-27 11:06:09 469
原创 【LeetCode】506. Relative Ranks【E】【50】
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: In
2017-02-24 21:47:34 799
原创 【LeetCode】492. Construct the Rectangle【E】【73】
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L
2017-02-23 16:23:15 567
原创 【LeetCode】520. Detect Capital【E】【83】
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases holds: All letters in t
2017-02-22 19:03:54 613
原创 【LeetCode】508. Most Frequent Subtree Sum【M】【40】
Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (includi
2017-02-22 13:34:02 549
原创 【LeetCode】442. Find All Duplicates in an Array【M】【60】
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twice in this array. Could you do it without ex
2017-02-22 11:02:35 388
原创 【LeetCode】495. Teemo Attacking【M】【41】
In LLP 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 ascending time series towards Ashe and the poisoning tim
2017-02-21 18:45:39 603
原创 【LeetCode】515. Find Largest Value in Each Tree Row【E】【87】
You need to find the largest value in each row of a binary tree. Example: Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9] Subsc
2017-02-19 18:37:01 1286
原创 【LeetCode】451. Sort Characters By Frequency【M】【68】
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twice while 'r' and 't' both appear once. So 'e
2017-02-19 10:30:50 444
原创 【LeetCode】448. Find All Numbers Disappeared in an Array【E】【77】
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array.
2017-02-18 16:20:19 324
原创 【LeetCode】513. Find Bottom Left Tree Value【M】【73】
Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3
2017-02-18 13:19:05 962
原创 【LeetCode】496. Next Greater Element I【E】【94】
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums
2017-02-18 10:01:39 685
原创 【LeetCode】500. Keyboard Row【E】【75】
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. Example 1: Input: ["Hello", "Alaska", "Da
2017-02-17 13:09:32 689
原创 【LeetCode】476. Number Complement【E】【59】
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed to fit within the range
2017-02-17 11:31:16 525
原创 【LeetCode】461. Hamming Distance【E】【90】
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x,
2017-02-16 12:32:05 510
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人