Row major representation, Data Structure & Algorithms

Row Major Representation

In memory the primary method of representing two-dimensional array is the row major representation. Under this representation, the primary row of the array occupies the first set of the memory location reserved for the array; second row occupies the next set, & so forth.

The representation of row major representation of an Array is shown in Figure

Let us assume the following two-dimensional array:

a          b          c          d

e          f           g          h

i           j           k          l


In order to make its equivalent row major representation, we carry out the following procedure:

Move the elements of the second row beginning from the first element to the memory location adjacent to the very last element of the first row. While this step is applied to all the rows except for the first row, you contain a single row of elements. It is the Row major representation.

By application of above demoted process, we get {a, b, c, d, e, f, g, h, i, j, k, l }


Row 0

Row 1

Row 2


Row i



                Figure: Schematic of a Row major representation of an Array

Posted Date: 4/4/2013 6:46:49 AM | Location : United States

Related Discussions:- Row major representation, Assignment Help, Ask Question on Row major representation, Get Answer, Expert's Help, Row major representation Discussions

Write discussion on Row major representation
Your posts are moderated
Related Questions
Define Big Theta notation Big Theta notation (θ) : The upper and lower bound for the function 'f' is given by the big oh notation (θ). Considering 'g' to be a function from t

Explain about the Structured types - Built-In Types Values of the carrier set are not atomic, consisting rather than several atomic values arranged in some way. Common illu

An adjacency matrix representation of a graph cannot having information of : Parallel edges

#include #include int sumFact(int numb); int calculateFactorial(int digit); main() { int numb, sumfact; do{ printf ("Enter a number 1 to 9999\n"); scanf("%

Write an assembly program to separate the number of positive numbers and negative numbers from a given series of signed numbers.

Q. Calculate that how many key comparisons and assignments an insertion sort makes in its worst case?        Ans: The worst case performance occurs in insertion

The following are several operations on a AA-tree: 1. Searching: Searching is done using an algorithm which is similar to the search algorithm of a binary search tree. 2. Ins

Q. Perform implementation of a queue using a singly linked list L. The operations INSER and DELETE should take O (1) time.