Giter Club home page Giter Club logo

leetcode's Introduction

  • 👋 Hi, I’m @apacheao
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

leetcode's People

Watchers

 avatar

leetcode's Issues

JS算法与数据结构之链表

为了能在这篇文章上有所收获,首先开篇之前提几个问题,带着这些问题我们就能基本了解关于链表的轮廓了。

  1. 为什么会使用链表,使用链表相比较其他数据结构有什么好处
  2. 链表长啥样(定义以及结构)
  3. 链表是如何进行一些操作的(插入,删除,查找,显示链表)
  4. 应用场景

底层数据都以数组的形式来存储数组,可数组并不是最佳的数据结构,因为在大多数编程语言中,数组的长度都属固定的,如果数据已经被填充满,倘若你还需要额外的加入元素的话就变得很麻烦。而且针对数组的删除与增加操作,还需要对其他元素进行移动位置(向前或向后),这些操作也会很繁琐。而在JavaScript中就不会存在这也问题,由于数组在JavaScript被定义成了对象,因此我们可以选择链表实现对JavaScript数据进行操作,是复杂度更低,更高效。

首先我们需要弄清楚链表的基本结构:

链表的基本结构

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.