- 博客(8)
- 资源 (3)
- 收藏
- 关注
原创 LeetCode415. Add Strings小学生都会
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.Note:The length of both num1 and num2 is Both num1 and num2 contains only digits 0-9.
2017-02-12 22:47:16 571
原创 Leetcode506. Relative Ranks简单粗暴
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".class Solution
2017-02-11 22:16:29 954
原创 LeetCode496. Next Greater Element I使用map解答
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-08 23:59:43 800
原创 LeetCode500. Keyboard Row我的C++解法
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",
2017-02-07 22:41:18 1263
原创 Leetcode501. Find Mode in Binary Search Tree大道至简
Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST.Assume a BST is defined as follows:The left subtree of a node contains onl
2017-02-06 15:53:52 1662
原创 LeetCode447. Number of Boomerangs时间复杂度O(N2)
Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of the tup
2017-02-05 17:20:30 526
原创 Leetcode350. Intersection of Two Arrays II很简单的做法
Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as ma
2017-02-04 17:14:29 379
原创 Leetcode492. Construct the Rectangle最简洁解法
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-04 11:43:38 713
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人