Row major representation, Data Structure & Algorithms

Assignment Help:

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


Related Discussions:- Row major representation

Road transport booking system, what algorithms can i use for the above titl...

what algorithms can i use for the above title in my project desing and implmentation of road transport booking system

Pseudocodes, how to draw a 5 inch square on the screen using * symbol

how to draw a 5 inch square on the screen using * symbol

Applications of b-trees, A database is a collection of data organized in a ...

A database is a collection of data organized in a manner that facilitates updation, retrieval and management of the data. Searching an unindexed database having n keys will have a

#binary search, Ask question #Minima binary search tree is used to locate t...

Ask question #Minima binary search tree is used to locate the number 43 which of the following probe sequences are possible and which are not? explainum 100 words accepted#

Non-recursive algorithm to traverse a tree in preorder, Write the non-recur...

Write the non-recursive algorithm to traverse a tree in preorder.    The Non- Recursive algorithm for preorder traversal is as follows: Initially  push NULL onto stack and

Hashing and hash functions, Q. Describe the term hashing. Explain any two u...

Q. Describe the term hashing. Explain any two usually used hash functions. Explain one method of collision resolution.

Implementing abstract data types, Implementing abstract data types A co...

Implementing abstract data types A course in data structures and algorithms is hence a course in implementing abstract data types. It may seem that we are paying a lot of atten

Applications of linear and binary search, The searching method are applicab...

The searching method are applicable to a number of places in current's world, may it be Internet, search engines, text pattern matching, on line enquiry, finding a record from data

Explain optimal binary search trees, Explain Optimal Binary Search Trees ...

Explain Optimal Binary Search Trees One of the principal application of Binary Search Tree is to execute the operation of searching. If probabilities of searching for elements

Applications, Arrays are simple, however reliable to employ in more conditi...

Arrays are simple, however reliable to employ in more condition than you can count. Arrays are utilized in those problems while the number of items to be solved out is fixed. They

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd