上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页
摘要: 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-08-16 09:16 YuriFLAG 阅读(110) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
posted @ 2016-08-16 09:09 YuriFLAG 阅读(111) 评论(0) 推荐(0)
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- 阅读全文
posted @ 2016-08-15 22:54 YuriFLAG 阅读(102) 评论(0) 推荐(0)
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
posted @ 2016-08-14 10:23 YuriFLAG 阅读(123) 评论(0) 推荐(0)
摘要: 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-08-14 09:45 YuriFLAG 阅读(129) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 解题报告: 1. 找到LinkedList 的中点 2. 翻转链表( 阅读全文
posted @ 2016-08-13 10:17 YuriFLAG 阅读(120) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. recursive version iterative version 阅读全文
posted @ 2016-08-13 09:23 YuriFLAG 阅读(89) 评论(0) 推荐(0)
摘要: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2016-08-07 15:39 YuriFLAG 阅读(112) 评论(0) 推荐(0)
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex 阅读全文
posted @ 2016-08-07 15:23 YuriFLAG 阅读(117) 评论(0) 推荐(0)
摘要: Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should have a linear runtime c 阅读全文
posted @ 2016-08-07 15:19 YuriFLAG 阅读(99) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页