Free Online Flashcard Deck

7 Data Structures for Problem Solving Free Online FlashCards

Study 7 Data Structures for Problem Solving with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is a string?

Back

A string is an ordered sequence of characters used to represent text. It supports operations such as indexing, slicing, searching, concatenation, and replacement.

02
Front

What does `word[0:4]` select?

Back

The ending position is excluded, so `word[0:4]` selects positions 0, 1, 2, and 3.

03
Front

What does string immutability mean?

Back

Strings are commonly immutable: an apparent modification creates a new string instead of changing the original string in place.

04
Front

How can repeated string construction be made more efficient?

Back

Use a list to collect pieces and call `str.join()` once. This is often more efficient than repeatedly concatenating large strings.

05
Front

What characterizes a Python list?

Back

A list is an ordered, mutable collection whose elements can be accessed by position and whose size can often change during execution.

06
Front

What is a record?

Back

A record groups related fields describing one entity, with meaningful field names such as `id`, `name`, and `grade`.

07
Front

What rule governs dictionary keys and updates?

Back

A dictionary maps keys to values. Its keys must be unique, and assigning to an existing key replaces that key’s previous value.

08
Front

How are rows, columns, and cells defined in a table?

Back

In a table, each row is a record, each column is a field or attribute, and each cell is the value at a row-column intersection.

09
Front

Which SQL operations match common collection changes?

Back

`INSERT` stores a new record, `SELECT` accesses or searches records, `UPDATE` modifies records, and `DELETE` removes records.

10
Front

Why combine collection types in nested structures?

Back

A nested collection mirrors layered data: an outer list can contain student records, and each record can contain a name string and a scores list.

11
Front

What should primarily guide data-structure selection?

Back

Choose a data structure by identifying the operations the algorithm performs most often, such as positional access, lookup by label, ordering, or persistence.

12
Front

What indexes are valid for a sequence of length nn?

Back

For a sequence of length nn, the usual valid indexes are 0 through n−1n-1. Thus, a three-element list has final valid index 2.