Follow

Translate

Monday, March 21, 2016

Inserting after a Given Node



1.         [OVERFLOW?]  If AVAIL = NULL,  then:  Write:  OVERFLOW, and Exit.

2.      [Remove first node from AVAIL list.]

3.   Set INFO[NEW] : = ITEM.    [Copies new data into new node.]

4.  If LOC = NULL, then:   [Insert as first node.]
              Set LINK[NEW] : = START and START : = NEW.
Else:     [Insert after node with location LOC.]
             Set LINK[NEW] : = LINK[LOC] and LINK[LOC] : = NEW.
[End of If structure]

5.Exit.

If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Related Posts:

  • Number Sorted Of Bubble Sort Suppose the following numbers are stored in an array A:                             … Read More
  • Binary Search Algorithm 4.6:  (Binary Search)  BINARY(DATA, LB, UB, ITEM, LOC) Here DATA ia a sorted array with lower bound LB and upper bound UB, and ITEM is a given item of information. The variables BEG, END and MID denote,… Read More
  • Inserting Into a Linear Array Inserting Into a Linear Array Algorithm:  (Inserting into a Linear Array) INSERT (LA, N, K, ITEM) Here LA is a linear array with N elements and K is a positive integer such that K < N. This algorithms inserts an ele… Read More
  • Binary Searching Array Element Binary Searching Array Element Let DATA be the following sorted 13-element array: DATA: 11, 22, 30, 33, 40, 44, 55, 60, 66, 77, 80, 88, 99 We apply the binary search to DATA for different values of ITEM. (a)  Suppos… Read More
  • Deleting From a Linear Array Algorithm:  (Deleting From a Linear Array)  DELETE (LA, N, K, ITEM) Here LA is a linear array with N elements and K is a positive integer such that K < N. This algorithms Deletes… Read More

0 comments:

Post a Comment