- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the length is 3. Given "bbbbb", the answer is "b", with
2017-08-31 18:53:48 139
原创 328. Odd Even Linked List
Discuss Pick One 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. You
2017-08-30 21:04:32 144
原创 2. Add Two Numbers
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 return i
2017-08-27 20:13:35 182
原创 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 another array, you must do this in place with
2017-08-27 15:50:28 136
原创 11. Container With Most Water
问题描述: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
2017-08-27 15:05:17 151
原创 21. Merge Two Sorted Lists
问题描述: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 首先虽然这道题被归类为数组,但是个人认为算是链表。 看到是两个sorted链表,那么只需要递归就可
2017-08-26 09:55:58 137
原创 27. Remove Element
问题描述: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant me
2017-08-26 08:54:59 135
原创 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same
2017-08-25 16:09:19 180
原创 118. Pascal's Triangle
Discuss Pick One Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] cla
2017-08-24 22:24:48 166
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人