LeetCode
IT_Magicwo
这个作者很懒,什么都没留下…
展开
-
[LeetCode][1 Two Sum]Java实现
学习笔记原创 2017-09-24 23:52:40 · 140 阅读 · 0 评论 -
[LeetCode][2 Add Two Numbers][medium]Java实现
原题: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and retu原创 2017-09-25 00:19:15 · 160 阅读 · 0 评论 -
[LeetCode][119. Pascal's Triangle II][easy]Java实现,杨辉三角
原题: Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to use only O(k) extra space?思路:此题是计算杨辉三角的题,比较简单,原创 2017-09-26 15:48:53 · 578 阅读 · 0 评论 -
[LeetCode][442. Find All Duplicates in an Array][medium]Java实现
原题: 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 extra原创 2017-09-26 15:56:46 · 185 阅读 · 0 评论 -
[LeetCode][448. Find All Numbers Disappeared in an Array][easy]Java实现
原题: 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.Coul原创 2017-09-26 15:53:16 · 137 阅读 · 0 评论