leetcode
coco_111
这个作者很懒,什么都没留下…
展开
-
344. Reverse String
344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". //把字符串进行翻转 利用i、j两个数进行标记下标 public clas转载 2016-04-26 11:26:23 · 181 阅读 · 0 评论 -
328. Odd Even Linked List
328. Odd Even Linked List Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes原创 2016-04-26 11:51:28 · 218 阅读 · 0 评论 -
26.Remove Duplicates from Sorted Array
26.Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for a原创 2016-04-26 11:54:46 · 191 阅读 · 0 评论 -
343. Integer Break
343. Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For e原创 2016-04-26 15:11:16 · 468 阅读 · 0 评论 -
341. Flatten Nested List Iterator
341. Flatten Nested List Iterator Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integers or o原创 2016-04-27 16:26:28 · 383 阅读 · 0 评论 -
347.Top K Frequent Elements
347. Top K Frequent Elements Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assume转载 2016-05-16 17:49:44 · 246 阅读 · 0 评论