Question: Suppose we have a 2D array M: [ } ) } ( { ] { ( Write an algorithm to traverse this array and make
Suppose we have a 2D array M:
| [ | } | ) |
| } | ( | { |
| ] | { | ( |
- Write an algorithm to traverse this array and make a pair of brackets :
Hint: [ ], { }, ( )
- Write a separate logic in a form of algorithm, as you get a bracket add it in a linked list node, then find its pair bracket , add it at second position in linked list and so on..
- Must show diagrammatic view of your algorithm.
Hint:
| [ | Next |
| ] | Next |
- Suppose Base(M) =400 and there are w=4 words per memory location.Find the effective indices E1,E2,E3 and the address of M[{ , ) , ] ] assuming M is sorted in row-major and column major order. Use diagram for solving and explaining the calculations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
