Chinaunix首页 | 论坛 | 博客
  • 博客访问: 270139
  • 博文数量: 170
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1709
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-06 18:01
文章分类

全部博文(170)

文章存档

2016年(11)

2015年(130)

2014年(29)

发布时间:2015-04-09 11:21:42

//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 constant memory.////For example,//Given input array A = [1,1,2],////Your function should r.........【阅读全文】

阅读(452) | 评论(0) | 转发(0)

发布时间:2015-04-09 11:08:58

//Reverse Nodes in k-Group Total Accepted: 29152 Total Submissions: 115092 My Submissions Question Solution //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 left-out nodes in the end shou.........【阅读全文】

阅读(458) | 评论(0) | 转发(0)

发布时间:2015-04-08 15:14:58

//Swap Nodes in Pairs Total Accepted: 43260 Total Submissions: 133314 My Submissions Question Solution //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 algorithm should use only c.........【阅读全文】

阅读(321) | 评论(0) | 转发(0)

发布时间:2015-04-07 10:49:39

/Merge k Sorted Lists Total Accepted: 38333 Total Submissions: 181458 My Submissions Question Solution //Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.import java.util.Comparator;import java.util.List;import java.util.PriorityQueue;//Me.........【阅读全文】

阅读(337) | 评论(0) | 转发(0)

发布时间:2015-04-06 13:34:32

//Single Number II Total Accepted: 45470 Total Submissions: 131046 My Submissions Question Solution //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 complexity. Could you implement it .........【阅读全文】

阅读(364) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册