自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

大宇的专栏

微信号:LATE-_-

  • 博客(14)
  • 资源 (3)
  • 收藏
  • 关注

原创 14、二叉树

function Node(data, left, right){ this.data = data; this.left = left; this.right = right; this.show = show;}function show(){ return this.data;}function BST(){ this.root = null; this.inser

2017-01-09 15:36:51 406

原创 13、集合

// 集合是一种包含不同元素的数据结构。集合中的成员是无序的,集合不允许相同的成员存在。 function Set(){ this.dataStore = []; this.add = add; this.remove = remove; this.size = size; // 并集:将两个集合中的成员进行合并,得到一个新集合 this.union = union;

2017-01-05 21:59:38 336

原创 12、线性探测法解决散列表保存字典的碰撞问题

function HashTable(){ this.table = new Array(137); this.values = new Array(); this.hashFunc = hashFunc; this.showDistro = showDistro; this.put = put; this.get = get;}function put(key, data){

2017-01-05 01:06:58 427

原创 11、线性探测法解决散列表碰撞问题

function HashTable(){ this.table = new Array(137); this.hashFunc = hashFunc; this.showDistro = showDistro; this.put = put; this.get = get;}function put(data){ var pos = thi

2017-01-05 00:39:05 913

原创 10、开链法解决散列表保存字典的碰撞问题

function HashTable(){ this.table = new Array(137); this.hashFunc = hashFunc; this.showDistro = showDistro; this.buildChains = buildChains; this.put = put; this.get = get;}function put(key, da

2017-01-04 21:55:48 417

原创 9、开链法解决散列表碰撞问题

// 散列法(Hashing)或哈希法是一种将字符组成的字符串转换为固定长度(一般是更短长度)的数值或索引值的方法,称为散列法,也叫哈希法。由于通过更短的哈希值比用原始值进行数据库搜索更快,这种方法一般用来在数据库中建立索引并进行搜索,同时还用在各种解密算法中。// 散列函数先计算字符串中各字符的ASCII码值,求和时每次要乘以一个质数后得到一个散列值,作为散列数组的索引。// 开链法解决碰

2017-01-04 21:52:28 635

原创 8、字典

function Dictionary(){ this.dataStore = new Array(); this.add = add; this.find = find; this.remove = remove; this.showAll = showAll; this.count = count; this.clear = clear;}function add(key,

2017-01-03 21:23:36 359

原创 7、双向链表

var log = console.log;function Node(element){ this.element = element; this.next = null; this.previous = null;}function LList(){ this.head = new Node("head"); this.find = find; this.findLast

2017-01-03 17:23:20 342

原创 6、单向链表

function LinkedList() { function Node(element) { this.element = element; this.next = null; } let length = 0; let head = null; this.append = (element) => { ...

2017-01-02 22:45:17 430

原创 5、简单队列、优先队列

一、简单队列function Queue() { let items = []; this.enqueue = element => { items.push(element); } this.dequeue = () => { return items.shift(); } this.fron...

2017-01-02 17:22:47 417

原创 4、栈

栈是一种高效的数据结构,因为数据只能在栈顶添加或删除,被称为一种后进先出(LIFO)的数据结构。push():入栈pop():出栈peek():只返回栈顶元素,而不删除它function Stack() { let items = []; this.push = element => { items.push(element); }...

2017-01-02 12:33:11 279

原创 3、列表

function List(){    this.listSize = 0;    this.pos = 0;    this.dataStore = [];    this.clear = clear;    this.find = find;    this.toString = toString;    this.insert = insert;    thi

2017-01-01 22:59:31 442

原创 2、二维数组与对象数组

// 创建二维数组Array.matrix = function(numrows, numcols, initial){    var arr = [];    for(var i=0; i        var columns = [];        for(var j=0; j            columns[j] = initial;        }

2017-01-01 20:32:27 2132

原创 1、数组

1、创建数组:var numArr = [];var numArr = new Array();var numArr = [1, 2, 3];var numArr = new Array(1, 2, 3);调用Array构造函数时,可以只传入一个参数,用来指定数组的长度:var numArr = new Array(10);console.log(numArr.length...

2017-01-01 18:05:09 738

zepto.min.js

zepto.min.js 代码压缩文件,直接引入到index.html即可。

2019-07-24

three.min.js

three.min.js 代码压缩文件,直接引入到index.html即可。

2019-07-24

VC 通用技巧范例大全

VC 通用技巧范例大全:各类VC用法介绍!

2013-06-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除