Follow

Translate

Monday, March 21, 2016

FINDBHL(INFO, LINK, START, ITEM, LOC, LOCP)

Procedure: FINDBHL(INFO, LINK, START, ITEM, LOC, LOCP)

1.  Set SAVE : = START and PTR : = LINK[START].  [Initializes pointer].

2. Repeat while INFO[PTR] != ITEM and PTR != START.
   Set SAVE : = PTR and PTR : = LINK[PTR].  [Updates Pointers]
[End of loop]

3.  If INFO[PTR] = ITEM, then:
   Set LOC : = PTR and LOCP : = SAVE.

Else: 
Set LOC : = NULL and LOCP : = SAVE.

[End of If 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:

  • Two basic Operation Of Stack Two basic Operation Of Stack:   (a) "PUSH" is the term used to insert an element into a stack. (b) "POP"   is the term used to remove an element into a stack. If You want to learn about the technol… Read More
  • Example Of Factorial Function Example Of Factorial Function:    n! = 1.2.3...............(n-2)(n-1)n 0! = 1             1! = 1         2! = 1.2 = 2     &… Read More
  • Traversing Binary Tree Traversing Binary Tree: There are three standard ways of traversing a binary tree T with root R. These three algorithms, called preorder, inorder and postorder. Preorder:         &n… Read More
  • What is Binary Trees? Binary Trees:  A binary tree T is defined set of elements, called nodes, such that: (a) T is empty (called the null tree or empty tree), or (b) T constants a distinguished node R, called the root of T, and the remainin… Read More
  • What is Recursion? Recursion:   A recursive must have two proprties (a)  There must be certain criteria, called base criteria, for which the procedure does not call itself. (b)  Each time the procedure does call itself (di… Read More

0 comments:

Post a Comment