1. Home
  2. Explore
  3. Computer Science
  4. Computer Memory and Arrays

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Computer Memory and Arrays

  • 81Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Memory Arrays
Computer memory can be conceptualized as a large line of tiny boxes, with each box holding a fundamental unit of data such as a
.

81 questions

  1. 1
    Computer memory can be conceptualized as a large line of tiny boxes, with each box holding a fundamental unit of data such as a
    _____
    .
    Hint

    Think of a small standard unit used to store characters and other data.

    Answer

    byte

  2. 2
    The sequential number labeling each memory box is called its
    _____
    .
    Hint

    It identifies the location where data can be read or written.

    Answer

    address

  3. 3
    The two fundamental operations supported by the memory interface are writing data to an address and
    _____
    data from an address.
    Hint

    This operation retrieves information already stored.

    Answer

    reading

  4. 4
    In programming terms, a memory address is essentially an
    _____
    into the array representing memory.
    Hint

    It is the numerical position used to locate an element.

    Answer

    index

  5. 5
    Everything that runs on a computer is built on an underlying array of
    _____
    .
    Hint

    This is the physical storage modeled as boxes with addresses.

    Answer

    memory

  6. 6
    The simplest possible memory implementation is an array containing one
    _____
    .
    Hint

    A single byte of memory can be viewed as one item in an array.

    Answer

    element

  7. 7
    With one byte of memory, a character must be stored at array index
    _____
    .
    Hint

    The first position in a zero-based array has this index.

    Answer

    zero

  8. 8
    The number of possible orderings of a set of elements is described by a mathematical operation called a
    _____
    .
    Hint

    For three distinct elements, this operation gives six possible arrangements.

    Answer

    factorial

  9. 9
    For three distinct elements, the number of possible arrangements is
    _____
    .
    Hint

    Use the factorial of three.

    Answer

    six

  10. 10
    As the number of elements increases, the number of possible orderings increases
    _____
    .
    Hint

    The growth is far faster than a simple linear increase.

    Answer

    astronomically

  11. 11
    To determine whether an unsorted array contains the letter Z, the basic available strategy is to check every element sequentially from address
    _____
    .
    Hint

    Begin at the first array position.

    Answer

    zero

  12. 12
    If characters are sorted in ascending alphabetical order, checking whether Z is present only requires examining the
    _____
    element.
    Hint

    Z would appear at the greatest position in ascending order.

    Answer

    last

  13. 13
    An array has a
    _____
    length, unlike an array list whose number of elements can grow.
    Hint

    Its physical storage cannot automatically change size.

    Answer

    fixed

  14. 14
    An array list is an
    _____
    collection of elements that supports reading and writing at arbitrary indexes.
    Hint

    The elements maintain a sequence or position.

    Answer

    ordered

  15. 15
    The length of the array underlying an array list is called its
    _____
    .
    Hint

    It represents how many elements the backing storage can hold.

    Answer

    capacity

  16. 16
    The number of items currently stored in an array list is called its size or
    _____
    .
    Hint

    It is separate from the backing array's capacity.

    Answer

    count

  17. 17
    When an array list adds an element to its end, it uses the current internal
    _____
    as the array index.
    Hint

    This value indicates the next unused position.

    Answer

    count

  18. 18
    Removing an element from the middle of an array list requires subsequent elements to shift
    _____
    by one.
    Hint

    They move toward lower indexes to fill the hole.

    Answer

    backwards

  19. 19
    Inserting an element into the middle of an array list requires subsequent elements to shift
    _____
    by one.
    Hint

    They move toward higher indexes to create space.

    Answer

    forwards

  20. 20
    Because array elements correspond to physical memory locations, a normal array cannot individually
    _____
    an element.
    Hint

    The physical storage associated with the index cannot simply disappear.

    Answer

    remove

  21. 21
    A stack restricts insertion and deletion to the
    _____
    element.
    Hint

    Think of the accessible top of a vertical pile.

    Answer

    last

  22. 22
    Removing an element from the top of a stack is called
    _____
    .
    Hint

    This operation is the stack counterpart to pushing.

    Answer

    popping

  23. 23
    Adding an element to a stack writes it just past the current last element and increases the
    _____
    by one.
    Hint

    This variable tracks how many items are in the stack.

    Answer

    count

  24. 24
    Popping the last element of a stack is efficient because no subsequent elements need to be
    _____
    .
    Hint

    There are no elements after the final one.

    Answer

    copied

  25. 25
    A common application of a stack is tracking
    _____
    changes in a text editor.
    Hint

    The most recent edit should be reversed first.

    Answer

    undoable

  26. 26
    Redo functionality can be implemented by maintaining a
    _____
    stack.
    Hint

    One stack stores changes to undo, while another stores changes to restore.

    Answer

    second

  27. 27
    Unlike a stack, a queue also allows removal from the
    _____
    of the collection.
    Hint

    This is the end opposite the back where items are added.

    Answer

    front

  28. 28
    Queues process elements in the order in which they are
    _____
    .
    Hint

    The earliest request should be handled first.

    Answer

    added

  29. 29
    A web server can use a queue so that responses are sent in the same order that requests
    _____
    .
    Hint

    Requests enter the system before they are processed.

    Answer

    came in

  30. 30
    In a circular queue, the index of an array access is reduced using the
    _____
    operator.
    Hint

    This operator produces a repeating range of values.

    Answer

    modulo

  31. 31
    When a circular queue reaches the end of its backing array, modulo arithmetic causes the next position to wrap around to
    _____
    .
    Hint

    The array begins at its first index.

    Answer

    zero

  32. 32
    A linked list keeps elements in order by storing a link to the
    _____
    element.
    Hint

    Each item indicates where the next item can be found.

    Answer

    following

  33. 33
    In an array-based linked list, each node stores its data and the array index of the
    _____
    user.
    Hint

    This field creates the connection through the list.

    Answer

    following

  34. 34
    When a new node is appended to the underlying array, updating the previous node's next index creates the
    _____
    between them.
    Hint

    This is the relationship that gives the structure its name.

    Answer

    link

  35. 35
    Inserting a node into a linked list does not require shifting later array elements; instead, the relevant next index
    _____
    are updated.
    Hint

    These stored values determine the chain order.

    Answer

    fields

  36. 36
    A next index of
    _____
    indicates that a linked-list node is the final node.
    Hint

    This special value means there is no following node.

    Answer

    -1

  37. 37
    Linked lists lose efficient access by position because the underlying array index does not necessarily equal the element's
    _____
    in the list.
    Hint

    The linked order can differ from physical storage order.

    Answer

    position

  38. 38
    To find the element at position 300,000 in a naive linked list, one must follow the next index approximately
    _____
    times.
    Hint

    The list must traverse from its beginning to that position.

    Answer

    300,000

  39. 39
    Linked lists provide strong insertion and deletion performance when there is a direct reference to the element
    _____
    or after the target.
    Hint

    Knowing a neighboring node allows its link to be changed directly.

    Answer

    before

  40. 40
    Iterating through a linked list is slower than iterating through an array because linked-list memory access often has poor
    _____
    performance.
    Hint

    Modern processors favor nearby, predictable memory accesses.

    Answer

    cache

  41. 41
    Pointers are essentially an
    _____
    into memory at the lowest software level.
    Hint

    They identify where the referenced data is located.

    Answer

    index

  42. 42
    Memory allocated with new or malloc is managed through an internal structure commonly called the
    _____
    .
    Hint

    This area supports dynamic allocation during program execution.

    Answer

    Heap

  43. 43
    A hashmap is also commonly referred to as a
    _____
    .
    Hint

    This structure associates keys with stored values.

    Answer

    dictionary

  44. 44
    Unlike an array, a hashmap uses a nonnumeric value such as a string as a lookup
    _____
    .
    Hint

    The key identifies the value being retrieved.

    Answer

    key

  45. 45
    The function that transforms an arbitrary key such as a string into a number is called a
    _____
    function.
    Hint

    This function gives the hashmap its name.

    Answer

    hash

  46. 46
    Because a hash value may be too large for direct array indexing, it is reduced using the
    _____
    operator and the array length.
    Hint

    This maps a large number into a bounded repeating range.

    Answer

    modulo

  47. 47
    Modulo mapping converts a hash value into an index from zero through the array length
    _____
    one.
    Hint

    The largest valid zero-based index is one less than the length.

    Answer

    minus

  48. 48
    When two different keys produce the same hashmap index, the situation is called a
    _____
    .
    Hint

    Two keys have arrived at the same storage location.

    Answer

    collision

  49. 49
    In one collision-resolution method, the hashmap searches
    _____
    through the array until it finds an empty slot.
    Hint

    The search proceeds toward increasing indexes.

    Answer

    forwards

  50. 50
    A hashmap using forward scanning must store identifying information such as the
    _____
    name to verify that a found item matches the requested key.
    Hint

    The example uses flower names as string keys.

    Answer

    flower

  51. 51
    Long consecutive runs of stored elements created by collision handling are called
    _____
    .
    Hint

    The term describes groups of nearby occupied positions.

    Answer

    clusters

  52. 52
    An alternative hashmap implementation stores collision items in a linked list maintained across a second
    _____
    .
    Hint

    The first array stores the initial item for each hash, while another stores collisions.

    Answer

    array

  53. 53
    A useful linked-list property is that multiple separate linked lists can be interleaved in the same
    _____
    .
    Hint

    The links, rather than physical adjacency, preserve each list's order.

    Answer

    array

  54. 54
    A data structure is fundamentally a strategy for finding something in an
    _____
    .
    Hint

    All low-level data access eventually identifies a position in memory.

    Answer

    array

  55. 55
    The first half of a data structure consists of the particular
    _____
    of elements in its underlying array.
    Hint

    It describes how elements are arranged or related in storage.

    Answer

    ordering

  56. 56
    The second half of a data structure is the
    _____
    used to perform operations such as finding, inserting, and removing elements.
    Hint

    It determines how the arrangement is accessed and changed.

    Answer

    logic

  57. 57
    A sorted array is an example of a data structure whose elements are ordered according to their
    _____
    .
    Hint

    Characters can be ordered alphabetically based on the values stored in them.

    Answer

    data

  58. 58
    Composite objects such as users can be sorted using a subfield such as the user's
    _____
    .
    Hint

    This field can uniquely identify a user.

    Answer

    ID

  59. 59
    To look up users by both name and ID, a program can maintain multiple arrays of
    _____
    into the actual user array.
    Hint

    These values indicate where the real objects are stored.

    Answer

    indexes

  60. 60
    In the multi-array user example, the index arrays function as
    _____
    to the user objects.
    Hint

    They tell the program where the actual object can be found.

    Answer

    pointers

  61. 61
    The best data-structure choice depends on the actual data and the expected patterns of
    _____
    .
    Hint

    Consider how the program will read, insert, and remove information.

    Answer

    access

  62. 62
    A tree is a structure in which relationships between nodes generally proceed in one direction from
    _____
    to bottom.
    Hint

    The upper node is the parent and the lower node is the child.

    Answer

    top

  63. 63
    Each element in a tree is called a
    _____
    .
    Hint

    It represents an individual item in the hierarchy.

    Answer

    node

  64. 64
    The upper node in a tree relationship is called the
    _____
    .
    Hint

    It can have one or more nodes below it.

    Answer

    parent

  65. 65
    The lower node in a tree relationship is called a
    _____
    .
    Hint

    It belongs below a parent in the hierarchy.

    Answer

    child

  66. 66
    In a tree, each child has only one
    _____
    , while a parent may have multiple children.
    Hint

    This is the key asymmetrical constraint distinguishing a tree from a more general graph.

    Answer

    parent

  67. 67
    An array-based tree can store all nodes in one array and their relationships in a second
    _____
    .
    Hint

    The second storage area records child links.

    Answer

    array

  68. 68
    In a two-array tree implementation, each node stores a child
    _____
    that points into the relationship array.
    Hint

    It identifies the first child relationship.

    Answer

    index

  69. 69
    Each tree relationship record stores the index of a child node and the index of the next linked-list item representing the next
    _____
    .
    Hint

    Sibling relationships are connected through this field.

    Answer

    child

  70. 70
    A tree is a constrained version of the more general data structure called a
    _____
    .
    Hint

    The more general structure permits fewer restrictions on relationships.

    Answer

    graph

  71. 71
    If a child is allowed to have multiple parents, the resulting structure is a
    _____
    rather than a tree.
    Hint

    This relaxes the tree's one-parent constraint.

    Answer

    graph

  72. 72
    In graph terminology, the links connecting nodes are called
    _____
    .
    Hint

    They represent connections between vertices or nodes.

    Answer

    edges

  73. 73
    A* is a pathfinding algorithm used to find the
    _____
    path between two points.
    Hint

    It seeks the best route for a character or agent to travel.

    Answer

    shortest

  74. 74
    Graphs can be implemented with two arrays by storing nodes in the first array and
    _____
    in the second array.
    Hint

    The second array records the connections between nodes.

    Answer

    edges

  75. 75
    To traverse a graph in both directions, a duplicate of a vertex may be stored so it is accessible from
    _____
    nodes.
    Hint

    Bidirectional traversal requires access from each endpoint.

    Answer

    both

  76. 76
    A library search system can return directions to a book's stable shelf location, functioning similarly to a
    _____
    .
    Hint

    It does not duplicate the book; it tells you where the original is.

    Answer

    pointer

  77. 77
    Keeping separate indexes sorted by different fields avoids duplicating the entire collection of
    _____
    objects.
    Hint

    The example supports lookup by both user name and user ID.

    Answer

    user

  78. 78
    A list's fast add operation is a special case of insertion at the
    _____
    .
    Hint

    No later elements need to move when adding after the final item.

    Answer

    end

  79. 79
    A stack's pop operation is a special case of removing an element at the
    _____
    of a list.
    Hint

    The stack only removes its top, which is its final stored element.

    Answer

    end

  80. 80
    A queue can reuse a fixed-size array without reallocating, resizing, or copying by treating it as a
    _____
    queue.
    Hint

    Its indexes wrap around from the end back to the beginning.

    Answer

    circular

  81. 81
    When approaching a new programming problem, a useful strategy is to start with just an
    _____
    and see how far it can be pushed.
    Hint

    The content emphasizes this as the foundation of every higher-level structure.

    Answer

    array

1 of 81
Question 1 of 81

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent