
leetcode
文章平均质量分 54
dream_hai
这个作者很懒,什么都没留下…
展开
-
leetcode 2 Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link原创 2015-10-20 23:57:42 · 290 阅读 · 0 评论 -
leetcode 1 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2015-10-09 22:26:13 · 273 阅读 · 0 评论 -
leetcode 258 Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on原创 2015-10-09 14:18:07 · 268 阅读 · 0 评论 -
leetcode 290 Word Pattern
Given a pattern and a string str, find if str follows the same pattern.Examples:pattern = "abba", str = "dog cat cat dog" should return true.pattern = "abba", str = "dog cat cat fish"原创 2015-10-09 12:53:16 · 231 阅读 · 0 评论