Giter VIP home page Giter VIP logo

Comments (1)

StefanSalewski avatar StefanSalewski commented on August 30, 2024

I am happy that people like you in China can still access my book, I heard that a lot of stuff is blocked by your leaders. And I hope the English language is not a too big problem for people in China.

For your question, inserting at both ends or the middle of a linked list is generally not that easy and fast. Typically, we store the head of the list, and so can easily replace that element by a new one. For this data structure, we would have to traverse the list to the end, to find the last element, before we can add the new one at that position. Similar for inserting somewhere in the middle. To enable adding new elements at the beginning and at the end, we may also store an additional pointer to the end, but that makes things more complicated.

For general list structures and its operations, you should be able to find a lotof information in the Internet or the local library. It is not that different for Nin than to C or other languages, but when you are using refs in Nim, you don't have to care for freeing nodes of course.

from nimprogrammingbook.

Related Issues (17)

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.