Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write an algorithm to count number of nodes in the circular linked list.
Ans.
Counting No of Nodes in Circular List
Let list be a circular header list in memory. This algorithm traverse and counts number of nodes in a LIST.
0. set COUNT: = 0
1. Set PTR: = LINK [START]. {Initializes the
pointer PTR}
2. Repeat steps 3, 4, 5 while PTR = START;
3. COUNT = COUNT + 1
4. Set PTR = LINK [PTR]. [PTR now points to next
node]
[End of step 2 loop]
5. Exit
Data type An implementation of an abstract data type on a computer. Therefore, for instance, Boolean ADT is implemented as the Boolean type in Java, and bool type in C++;
what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list
Describe an algorithm to play the Game of Nim using all of the three tools (pseudocode, flowchart, hierarchy chart)
In worst case Quick Sort has order O (n 2 /2)
1. A string s is said to be periodic with a period α, if s is α k for some k > 2. (Note that α k is the string formed by concatenating k times.) A DNA sequence s is called a tand
Q. A linear array A is given with lower bound as 1. If address of A[25] is 375 and A[30] is 390, then find address of A[16].
two standards ways of traversing a graph in data structure
What is algorithm's Optimality? Optimality is about the complexity of the problem that algorithm solves. What is the minimum amount of effort any algorithm w
Any Binary search tree has to contain following properties to be called as a red- black tree. 1. Each node of a tree must be either red or black. 2. The root node is always b
Abstract data type The thing which makes an abstract data type abstract is that its carrier set and its operations are mathematical entities, like geometric objects or numbers;
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd