Row major storage, Data Structure & Algorithms

Assignment Help:

Q. Take an array A[20, 10] of your own. Suppose 4 words per memory cell and the base address of array A is 100. Find the address of A[11, 5] supposed row major storage.                          

Ans.

A[20, 10]

W = 4 words

Base (A) = 100

A [11, 5] → in row major m x n

loc [ a [i] [j] = base (a) + w [n [i - lbr] + ( j - lbc)]

= 100 + 4 [10 (11) + 5]

= 100 + 4[110+5]

=100 + 115 *4

= 560

 

 


Related Discussions:- Row major storage

Explain in brief the asymptotic notations, Question 1 Write the different ...

Question 1 Write the different characteristics of an algorithm Question 2 Explain in brief the asymptotic notations Question 3 Write an algorithm of insertion sort and e

Asymptotic notation.., important points on asymptotic notation to remember

important points on asymptotic notation to remember

Dqueue, how can i delete from deque while deletion is restricted from one e...

how can i delete from deque while deletion is restricted from one end

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.

Advanced data structures - splay trees, This is a unit of which targeted on...

This is a unit of which targeted on the emerging data structures. Red- Black trees, Splay trees, AA-trees & Treaps are introduced. The learner must explore the possibilities of app

Stack making use of the linked list, Q. Implement a stack making use of the...

Q. Implement a stack making use of the linked list. Show the PUSH and POP operations both. A n s . Stack implemantation using linked list # include # include

How do collisions happen during hashing, How do collisions happen during ha...

How do collisions happen during hashing? Usually the key space is much larger than the address space, thus, many keys are mapped to the same address. Assume that two keys K1 an

Algorithm, Example of worse case of time

Example of worse case of time

Explain in detail about the ruby arrays, Explain in detail about the Ruby a...

Explain in detail about the Ruby arrays Ruby arrays have many interesting and powerful methods. Besides indexing operations which go well beyond those discussed above, arrays h

Explain almost complete binary tree, Almost Complete Binary Tree :-A binary...

Almost Complete Binary Tree :-A binary tree of depth d is an almost whole binary tree if: 1.Any node and at level less than d-1 has two children. 2. for any node and in the tree wi

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