IMPLEMENTATION OF SINGLE LINKED LIST IN JS (PART-1)

What is linked list ?🥷

bk_bharathikannan
2 min readAug 7, 2022

A linked list is an ordered collection of data elements. A data element can be represented as a node in a linked list. Each node consists of two parts: data field & link field.

There are four types of linked list:-

  • Singly linked list.⬇️
  • Doubly linked list.⬇️
  • Circular linked list.⬇️
  • Doubly circular linked list.⬇️

IMPLEMENTATION OF SINGLE LINKED LIST:-

CLASS AND CONSTRUCTOR:-

The constructor() method is called automatically when a class is initiated, and it has to have the exact name “constructor”, in fact, if you do not have a constructor method, JavaScript will add an invisible and empty constructor method. Note: A class cannot have more than one constructor() method……

‘’ IF YOU LIKE THIS ARTICLE GIVE A CLAP AND FOLLOW FOR MORE ARTICLES……IT GIVES HUGE MOTIVATION‘’💫

𝔻𝕠 𝕪𝕠𝕦 𝕨𝕒𝕟𝕥 𝕡𝕒𝕣𝕥-𝟚 𝕔𝕠𝕞𝕞𝕖𝕟𝕥 𝕓𝕖𝕝𝕠𝕨⬇️

THINK TWICE💭-code once!

THANKS_FOR_READING_!🌟

❤️“Have a Fine_Day”❤️

--

--