2016年9月12日

62. Unique Paths

摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文

posted @ 2016-09-12 13:24 三颗心 阅读(170) 评论(0) 推荐(0)

24. Swap Nodes in Pairs

摘要: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文

posted @ 2016-09-12 13:01 三颗心 阅读(178) 评论(0) 推荐(0)

83. Remove Duplicates from Sorted List

摘要: Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文

posted @ 2016-09-12 12:11 三颗心 阅读(141) 评论(0) 推荐(0)

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 当我们得到两个链表 阅读全文

posted @ 2016-09-12 11:20 三颗心 阅读(360) 评论(0) 推荐(0)

141. Linked List Cycle

摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 阅读全文

posted @ 2016-09-12 11:00 三颗心 阅读(115) 评论(0) 推荐(0)

268. Missing Number

摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 1, 阅读全文

posted @ 2016-09-12 10:52 三颗心 阅读(213) 评论(0) 推荐(0)

191. Number of 1 Bits

摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文

posted @ 2016-09-12 10:40 三颗心 阅读(159) 评论(0) 推荐(0)

231. Power of Two

摘要: Given an integer, write a function to determine if it is a power of two. 阅读全文

posted @ 2016-09-12 10:26 三颗心 阅读(115) 评论(0) 推荐(0)

9. Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space. 阅读全文

posted @ 2016-09-12 10:16 三颗心 阅读(176) 评论(0) 推荐(0)

88. Merge Sorted Array

摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha 阅读全文

posted @ 2016-09-12 09:57 三颗心 阅读(182) 评论(0) 推荐(0)

导航