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

State about the pre- and post conditions, State about the pre- and post con...

State about the pre- and post conditions Programmers can easily document other pre- and post conditions and class invariants, though, and insert code to check most value preco

Red-black tree after insertion, The above 3 cases are also considered conve...

The above 3 cases are also considered conversely while the parent of Z is to the right of its own parent. All the different kind of cases can be illustrated through an instance. Le

Write down any four applications of queues, Write down any four application...

Write down any four applications of queues.            Application of Queue (i)  Queue is used in time sharing system in which programs with the similar priority form a queu

Non-recursive implementation of preorder traversal, For preorder traversal,...

For preorder traversal, in the worst case, the stack will rise to size n/2, where n refer to number of nodes in the tree. Another method of traversing binary tree non-recursively t

Finite automata, find the grammar of regular expression of (a/?)(a/b)?

find the grammar of regular expression of (a/?)(a/b)?

Algorithms, b) The user will roll two (six-sided) dices and the user will l...

b) The user will roll two (six-sided) dices and the user will lose the game if (s)he gets a value 1 on either any of the two dices & wins otherwise. Display a message to the user w

Sort the Sequence Using Merge Sort, Q. Sort the sequence written below of k...

Q. Sort the sequence written below of keys using merge sort. 66, 77, 11, 88, 99, 22, 33, 44, 55                                                                      Ans:

Give the example of bubble sort algorithm, Give the example of bubble sort ...

Give the example of bubble sort algorithm For example List: - 7 4 5 3 1. 7 and 4 are compared 2. Since 4 3. The content of 7 is now stored in the variable which was h

Single pointer pointing to the tail of the queue, Can a Queue be shown by c...

Can a Queue be shown by circular linked list with only single pointer pointing to the tail of the queue? Yes a Queue can be shown by a circular linked list with only single p

Draws a rectangular grid algorithms, Prepare a GUI called Hotplate GUI that...

Prepare a GUI called Hotplate GUI that holds a central panel that draws a rectangular grid that represents Element objects which should be held in a 2-dimensional array. The applic

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