- 博客(4)
- 收藏
- 关注
原创 Remove Duplicates from Sorted Array II
Problem Descriptions: Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your function should r
2016-12-20 01:17:40 240
原创 二分查找的实现
Discription on Binary SearchThe binary search algorithm is used to search an element in the sorted array. It’s faster than linear search and improves perfomance from O(n) to O(logN) for searching an e
2016-12-19 17:16:23 453
原创 Java学习记录01
构造代码块 一个class里面出现一个大括号里面包含一些代码的东西,我们称之为构造代码块 , 构造代码块是先于构造函数执行的,用来初始化个对象共有的内容。而构造函数是用来给相应的对象初始化的。 class Person{ private int age; private String name; //构造代码块,每一个人对象建立的时候都是哭
2016-12-13 00:54:13 185
原创 Merge Sorted Lists and Merge Sorted Arrays
1.问题描述:Merge two sorted lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.分析: 这个问题是让操作两个有序的链表,由于操作链表其实就是改变节点之间的指针的指向,所以直接按要求修改节点之间的指针就
2016-12-09 17:27:18 383
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人