首页 > 编程语言 > 详细

[Java coding] leetcode notes

时间:2014-09-11 23:46:42      阅读:386      评论:0      收藏:0      [点我收藏+]

Start from Difficulty 1:

1, Remove specified elem from unsorted array: 2 pointers, one is to iterate all the elements in the array, the other is to increase if current value is not equal to specified element. 

2, Remove duplicates from sorted array: still 2 pointers, compare current value with previous.

3, Remove 3rd duplicate from sorted array: on 2, have another var to store the appearance number.

4, Remove duplites from sorted linked list: prev & curr, then pay attention to null head input.

 

[Java coding] leetcode notes

原文:http://www.cnblogs.com/chayu3/p/3967433.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!