Column major representation, Data Structure & Algorithms

Column Major Representation

In memory the second method of representing two-dimensional array is the column major representation. Under this illustration, the first column of the array occupies the first set of the memory locations kept for the array. The second column occupies next set & so forth. The representation of a column major representation is illustrated in Figure

Assume the following two-dimensional array:

1518_Column Major Representation.png

To make its equivalent column major representation, we carry out the following procedure:

Transpose the elements of the array. After that, the representation will be alike as that of the row major representation.

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

Col 0

Col 1

Col 2

.....

Col i

 

 

Figure: Schematic of Column major representation of an Array

1) In which array can be stored?

2) In which, the elements of array are stored row wise.

3) In which, the elements of array are stored column wise.

 

Posted Date: 4/4/2013 6:48:27 AM | Location : United States







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

Write discussion on Column major representation
Your posts are moderated
Related Questions
A  BST is traversed in the following order recursively: Right, root, left e output sequence will be in In Descending order

A LGORITHM (Deletion of an element from the linked list) Step 1  Begin Step 2  if the list is empty, then element cannot be deleted Step 3  else, if the element to be del

Q. Using the following given inorder and preorder traversal reconstruct a binary tree Inorder sequence is D, G, B, H, E, A, F, I, C

Explain an efficient method of storing a sparse matrix in memory. Write a module to find the transpose of the sparse matrix stored in this way. A matrix which contains number o

Djikstra's algorithm (named after it is discovered by Dutch computer scientist E.W. Dijkstra) resolves the problem of finding the shortest path through a point in a graph (the sour

Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different

In this project you will write a program to produce a discrete time simulation of a queue as shown in Fig. 1. Time is slotted on the input and the output. Each input packet follows

Q. Write down an algorithm to insert a node in between any two nodes in a linked list         Ans. Insertion of a the node after the given element of the listis as follows

What is the best-case number of comparisons performed by mergesort on an input sequence of 2 k distinct numbers?

Write an algorithm for binary search. Algorithm for Binary Search 1.  if (low> high) 2.  return (-1) 3.  Mid = (low + high)/2 4.  if ( X = = a[mid]) 5.  return (mid); 6.