首页 > 代码库 > [Java coding] leetcode notes
[Java coding] leetcode notes
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。