- 博客(6)
- 收藏
- 关注
原创 Contains Duplicate
问题描述:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every e
2016-05-09 00:19:04 201
原创 C++ map的使用总结
说到C++中的Map这个容器,如果你以前接触过其他高级编程语言,比如C#,Object-C等等,其实这个东西就是字典Dictionary。提供一种键值对,听说C++中的这个MAP底层是用红黑树这种很牛逼的数据结构实现的,红黑树大部分数据结构的书都会提到,但都会简单的一笔带过。因为真的不是人人都能学会的,,,好了,接着说我们的map1、要用这个map的话,你必须包含他的头文件#inclu
2016-05-08 11:31:39 496
原创 Remove Linked List Elements
Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5分析:这个问题肯定是的有两个指针,一个指向当
2016-05-07 16:58:37 708
原创 Remove Duplicates from Sorted Array
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
2016-05-07 16:45:10 204
原创 数据结构之表
线形表分为:顺序存储(顺序表)和链式存储(链表)。而顺序表有分为:静态存储和动态存储,静态存储借助了一维数组来实现#define maxSize 10typedef int DataType;typedef struct {DataType data[maxSize];int n;}SeqList动态存储实现如下#define initSize 10type
2016-05-04 20:14:44 301
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人