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 |
What are the advantages/disadvantages of using inline and const?
C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.
What is partial specialization or template specialization?
What is a virtual function in C++?
How to invoke a C function using a C++ program?
What does it mean to declare a member function as static in C++?
How to input string in C++
When would you use a pointer? A reference?
What is name mangling/name decoration?
What is the difference between creating an object, using 'new' and using 'malloc'?
Explain what happens when an exception is thrown in C++.
What is function overloading and operator overloading in C++?