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 C++11?

1 Answers   Adobe,


Describe the different styles of function prototypes in C++.

0 Answers   Adobe,


What is an abstract class?

5 Answers   Siemens,


How to delete array of objects in C++? Proof by C++ code for proper deletion

0 Answers  


What are issues if we mix new and free in C++?

0 Answers  


What are the fundamental features of an object-oriented language?

0 Answers   Accenture,


What is a class in C++?

1 Answers   Amazon, TCS, UGC Corporation,


Explain the difference between method overriding and method overloading in C++?

0 Answers   Accenture,


Is there a difference between class and struct?

0 Answers  


What do you by Function Overloading in C++?

0 Answers   Akamai Technologies, Infogain,


Name the operators that cannot be overloaded.

1 Answers   Wipro,


What is a virtual function in C++?

0 Answers   C DAC,


Categories