Home »
» SRCHHL(INFO, LINK, START, ITEM, LOC)
Unknown 11:45:00 AM
1. Set PTR : = LINK[START]
2. Repeat while INFO[PTR] != ITEM and PTR != START:
Set PTR : = LINK[PTR]. [PTR now points to the next node]
[End of loop]
3. If INFO[PTR] = ITEM, then:
Set LOC : = PTR.
Else :
Set LOC : = NULL.
[End of structure.]
4.Exit
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :
CSE SOLVE
Related Posts:
Deleting the Node with a Given ITEM of Information
Procedure: FINDB(INFO, LINK, START, ITEM, LOC, LOCP)
This procedure finds the location LOC of the first node N which contains ITEM and the location LOCP of the node preceding N. If ITEM does not appear in the… Read More
Searching A Link List
LIST Is Unsorted:
Algorithm: SEARCH(INFO, LINK, START, ITEM, LOC)
LIST is a linked list in memory. This algorithm finds the location LOC of the node where ITEM fistn appears in LIST, or sets LOC = NU… Read More
Deleting the Node with a Given ITEM of Information
Procedure: DELETE(INFO, LINK, START, AVAIL, ITEM)
This algorithm deletes from a linked list the first node N which contains given ITEM of information.
1. [Use procedure FINDB to find the location o… Read More
PATH LENGTH: HUFFMAN'S ALGORITHM
PATH LENGTH: HUFFMAN'S ALGORITHM:
An extended binary tree or 2-tree is a binary tree T which each node has either 0 or 2 node children. The nodes with 0 children are called external nodes. and the nodes with 2 children ar… Read More
Huffman's Algorithm
Huffman's Algorithm: Suppose w1 and w2 are two minimum weights among the n given weights w1, w2,..................,wn.Find a tree T Prime which gives a solution for the n - 1 weights
w1 + w2,… Read More
0 comments:
Post a Comment