Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/abdeladim20/linked-list

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/abdeladim20/linked-list

  • v0.0.0-20240808131254-1b74cbe3c74d
  • Source
  • Go
  • Socket score

Version published
Created
Source

linked-list

linkedList1 :

Insert Function: Adds a new node to the end of the list. Delete Function: Removes the first node with the specified value from the list. Search Function: Returns true if a node with the given value is found, otherwise false. Display Function: Prints the entire list in a readable format.

This example demonstrates how to insert, delete, and search within a linked list in Go. You can further extend this implementation to add more features, like inserting at the beginning, inserting after a specific node, or deleting the entire list.

Doubly Linked List :

This example demonstrates how to implement a doubly linked list in Go, with functionalities for inserting, deleting, and searching nodes, as well as displaying the list in both directions.

A doubly linked list is similar to a singly linked list, but each node has two pointers: one pointing to the next node and another pointing to the previous node. This allows traversal in both directions.

Insert Function: Adds a new node to the end of the list. It updates both the prev and next pointers. Delete Function: Removes the first node with the specified value. It adjusts both the next and prev pointers based on the node's position. Search Function: Returns true if a node with the given value is found, otherwise false. DisplayForward & DisplayBackward Functions: Print the list from head to tail and tail to head, respectively.

FAQs

Package last updated on 08 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc