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

What is the difference between Stack and Queue in C++?

0 Answers   Global Logic, iNautix,


What is a memory leak in C++?

0 Answers   Agilent,


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.

0 Answers   Alter,


How can you force the compiler to not generate them?

0 Answers   Amazon,






What Are The Differences Between A C++ Struct And C++ Class?

2 Answers   Wipro,


What's the value of the expression 5["abxdef"]?

0 Answers  


dynamic scoping is

0 Answers   Siemens,


Name the operators that cannot be overloaded.

1 Answers   Wipro,


explain the term 'resource acquisition is initialization'?

0 Answers   Amazon,


Discuss about iteration statements in C++ .

0 Answers   Agilent,


Define type casting in C++.

0 Answers   Amdocs,


Categories