Explore BrainMass

Explore BrainMass

    queues and lists

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Q1.Suppose an array with 6 rows and 8 columns is stored in row major order starting at address 20 (base ten). If each entry in the array requires only one memory cell, what is the address of the entry in the third row and fourth column? What if each entry requires two memory cells?

    Q2.Describe how an array could be used to implement a queue in a high-level language.

    Q3.Describe a data structure suitable for representing a board configuration during a chess game.

    © BrainMass Inc. brainmass.com March 4, 2021, 5:57 pm ad1c9bdddf
    https://brainmass.com/computer-science/arrays/queues-and-lists-19867

    Solution Preview

    Each data are stored in an array has a unique address. And the addressing traverses a zig-zag pattern starting with (0,0) and ending at (n,n)
    <br>
    <br>q1.
    <br>Given,
    <br>Base address = 20; 6 rows and 8 columns
    <br>lets call the array as arr[][]
    <br>
    <br>a) 1 ...

    $2.49

    ADVERTISEMENT