Tell How To Check Whether A Linked List Is Circular ?



Tell How To Check Whether A Linked List Is Circular ?..

Answer / dhayalan.n

we will store the header node into some other variable, then traverse the list, if we get null at the next part of any node, then that is not circular, otherwise we will check the next node is same as the stored node or not, if so then that is circular

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Can we call a virtual function from a constructor?

1 Answers  


What Is A Default Constructor in C++ ?

0 Answers   Amazon,


Discuss the role of C++ shorthands.

0 Answers   Adobe,


In C++ what do you mean by Inheritance?

0 Answers   Accenture,


If class D is derived from a base class B

0 Answers  






Write a C++ Program to find Addition of Two Numbers.

1 Answers  


How to generate random numbers in C++ with a range?

0 Answers  


How to run C++ program in cmd

0 Answers  


Difference between Call by pointer and by reference.

0 Answers   Adobe,


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


In C++ what is the meaning of data hiding?

0 Answers   Aricent,


How to invoke a C function using a C++ program?

0 Answers   Alter,


Categories