自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 js实现二叉搜索树

class Node { constructor(key) { this.key = key; this.left = null; this.right = null; }}class BinarySearchTree { constructor() { this.root = null; } insert(key) { const newNode = new Node(key); if (this.root === null)

2020-12-02 16:37:25 92

原创 js实现单向链表

class Node { constructor(data) { this.data = data; this.next = null; }}class LinkedList { constructor() { this.length = 0; this.head = null; } append(data) { const newNode = new Node(data); if (this.length === 0) {

2020-12-02 16:19:31 143

原创 js实现栈结构

class Stack { //属性 constructor() { this.items = []; } //压栈 push(ele) { this.items.push(ele); } //弹栈 pop() { return this.items.pop(); } //peek peek() { return this.items[this.items.length - 1]; } //判断是否为空 isEmpty.

2020-12-02 16:09:10 78

原创 js实现继承的几种方式

1.原型链继承 function Father(name) { this.name = name || 'father'; } Father.prototype.printName = function () { console.log(this.name); }; function Son() {} Son.prototype = new Father();

2020-11-12 11:20:49 176 1

原创 Vuex 区分 State 是外部直接修改,还是通过commit修改

computed: {height() {return this.KaTeX parse error: Expected 'EOF', got '}' at position 29: …eight; }̲, flag(…store.state;}},watch: {flag: {handler() {if (this.KaTeX parse error: Expected '}', got 'EOF' at end of input: …nsole.log(t

2020-11-11 17:07:37 724

空空如也

空空如也

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

TA关注的人

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