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
Describe new operator?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
How long does it take to get good at leetcode?
Why is destructor used?
What are the rules about using an underscore in a c++ identifier?
What are protected members in c++?
What are the advantages of using pointers in a program?
How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?
Why do we use the using declaration?
Explain the register storage classes in c++.
How do you define a class in oop?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
what are the iterator and generic algorithms.
Describe exception handling concept with an example?