Tell How To Check Whether A Linked List Is Circular ?
Answer Posted / 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 View All Answers
What is a pointer how and when is it used?
How to run C++ program in cmd
Mention the purpose of istream class?
What is an incomplete type in c++?
What are the various types of stl containers?
What do you mean by enumerated data type?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
What is c++ try block?
What is &x in c++?
Can circle be called an ellipse?
What is difference between rand () and srand ()?
Is string data type in c++?
Are iterators pointers?
What is a virtual function in C++?
Describe the process of creation and destruction of a derived class object?