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!
Q. Write an algorithm that counts number of nodes in a linked list.
Ans.
Algorithm to Count No. of Nodes in Linked List
COUNT (INFO, LINK, START, NUM)
1. Set NUM: = 0 [initializes counter]
2. Set PTR=START [ initializes pointer]
3. Repeat steps 4 & 5 while PTR! = NULL
4. Set NUM:= NUM + 1 [ increases NUM by 1]
5. Set PTR: =LINK [PTR] . [updates pointer to point to next node]
[End of step 3 loop]
6. Return
Merge sort is also one of the 'divide & conquer' classes of algorithms. The fundamental idea in it is to split the list in a number of sublists, sort each of these sublists & merge
Data Structure and Algorithm 1. Explain linked list and its types. How do you represent linked list in memory? 2. List and elucidate the types of binary tree. 3. Descr
Explain divide and conquer algorithms Divide and conquer is probably the best known general algorithm design method. It work according to the following general p
Q. Write down the binary search algorithm and trace to search element 91 in following given list: 13 30 62 73 81 88 91
Explain Floyd's algorithm It is convenient to record the lengths of shortest paths in an n by n matrix D known as the distance matrix: the element d ij in the i th row an
Ask consider the file name cars.text each line in the file contains information about a car ( year,company,manufacture,model name,type) 1-read the file 2-add each car which is repr
The number of interchanges needed to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is 5
State about the pre- and post conditions Programmers can easily document other pre- and post conditions and class invariants, though, and insert code to check most value preco
Ans: A procedure to reverse the singly linked list: reverse(struct node **st) { struct node *p, *q, *r; p = *st; q = NULL; while(p != NULL) { r =q;
#question.explain different types of errors in data transmission.
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