Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about circular-list

Read more about circular-list

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - circular-list

Why my Circular Singly Linked List Java code not working? It says that Node is null can't put data on it

For the meantime, I'm trying to figure out the basics of how Circular Singly Linked List works. In this case, I'm creating a program in which, user can input from 1 to 3, the number of linked nodes. H...
test-img

fahis23

java

nodes

singly-linked-list

circular-list

Votes: 0

Answers: 1

Latest Answer

The error is on this line: head.data=num;num++; It is quite clear that head was never assigned a node reference. It is still null. In fact, you did create a node and assigned it to newnode, but then ...
test-img

trincot

Do I have to delete the node or the garbage collector does the work in JS?

To delete the last node of the circular link list in JS, I will traverse to the second last node and I will link the second last node with the first node, the last node is now disconnected from the ch...
test-img

POUDEL BANWO

javascript

node.js

data-structures

linked-list

circular-list

Votes: 0

Answers: 1

Latest Answer

JavaScript handles freeing memory through the use of the garbage collector. As long as there are no longer any references pointing to an object, where all references have moved out of scope, it will b...
test-img

Matt Davis

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved