Representation of arrays?, Data Structure & Algorithms

A representation of an array structure is a mapping of the (abstract) array with elements of type T onto the store which is an array with elements of type BYTE. The array could be mapped in such a way that the computation of addresses of array elements is as simple as possible. The address i of the j-th array elements is computed by the linear mapping function

i = i0 + j*s

where i is the address of the first element, and s is the number of words that a element occupies. Assuming that the word is the smallest personally transferable unit of store, it is evidently highly needed that s be a whole number value, the simplest case being s = 1. If s is not a whole number, then s is generally rounded up to the next larger integer S. Each array component then accepts S words, whereby S-s words are left unused. Rounding up of the number of words required to the next whole number is called padding. The storage utilization factor u is the quotient of the minimal amounts of storage required to represent a structure and of the value actually used:

 

684_Representation of Array.png

Posted Date: 7/27/2012 6:18:24 AM | Location : United States







Related Discussions:- Representation of arrays?, Assignment Help, Ask Question on Representation of arrays?, Get Answer, Expert's Help, Representation of arrays? Discussions

Write discussion on Representation of arrays?
Your posts are moderated
Related Questions
WRITE AN ALGORITHM TO CONVERT PARENTHIZED INFIX TO POSTFIX FORM ALSO TRACE ALG ON ((A+B)*C-(D-E)$F+G)

The insertion procedure in a red-black tree is similar to a binary search tree i.e., the insertion proceeds in a similar manner but after insertion of nodes x into the tree T, we c

Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.

Complexity of an Algorithm An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorith

5. Implement a stack (write pseudo-code for STACK-EMPTY, PUSH, and POP) using a singly linked list L. The operations PUSH and POP should still take O(1) time.

Write an algorithm to print all even numbers in descending order and draw the flowchart

If a node having two children is deleted from a binary tree, it is replaced by?? Inorder successor

With the help of a program and a numerical example explain the Depth First Traversal of a tree.

Handout 15 COMP 264: Introduction to Computer Systems (Section 001) Spring 2013 R. I. Greenberg Computer Science Department Loyola University Water TowerCampus, Lewis Towers 524 82

A binary tree is a special tree where each non-leaf node can have atmost two child nodes. Most important types of trees which are used to model yes/no, on/off, higher/lower, i.e.,