<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://staging.moocwiki.org/index.php?action=history&amp;feed=atom&amp;title=English%3AData_Structures</id>
	<title>English:Data Structures - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://staging.moocwiki.org/index.php?action=history&amp;feed=atom&amp;title=English%3AData_Structures"/>
	<link rel="alternate" type="text/html" href="https://staging.moocwiki.org/index.php?title=English:Data_Structures&amp;action=history"/>
	<updated>2026-09-04T05:03:46Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in MOOCsWiki Staging</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://staging.moocwiki.org/index.php?title=English:Data_Structures&amp;diff=47958&amp;oldid=prev</id>
		<title>Glanz: aiMOOC über GPT aiMOOC Action erstellt</title>
		<link rel="alternate" type="text/html" href="https://staging.moocwiki.org/index.php?title=English:Data_Structures&amp;diff=47958&amp;oldid=prev"/>
		<updated>2026-08-29T12:25:37Z</updated>

		<summary type="html">&lt;p&gt;aiMOOC über GPT aiMOOC Action erstellt&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{T}}&lt;br /&gt;
[[Category:English]]&lt;br /&gt;
[[Category:Data Structures]]&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Data structures are organized ways to store, relate, access, and update data. They are central to [[English:Computer science|computer science]] because the same information can behave very differently depending on how it is represented. A program that chooses an appropriate structure can become faster, clearer, and easier to maintain.&lt;br /&gt;
&lt;br /&gt;
This aiMOOC is designed for learners in Grades 11–13. You will compare common structures, reason about their efficiency, connect them to algorithms, and select structures for realistic programming problems. You do not need to memorize every implementation detail. Instead, focus on the relationship between a problem, the operations it needs, and the structure that supports those operations well.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=DuDz6B4cqVc|500|center}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Learning goals&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# [[English:Data structure|Explain data structures]]: Describe why programs organize data in different ways.&lt;br /&gt;
# [[English:Abstract data type|Distinguish interfaces and implementations]]: Separate what an abstract data type promises from how a program stores it.&lt;br /&gt;
# [[English:Algorithm analysis|Analyze efficiency]]: Compare common operations using Big O notation.&lt;br /&gt;
# [[English:Programming|Implement structures]]: Trace and write basic operations on arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs.&lt;br /&gt;
# [[English:Problem solving|Choose structures]]: Justify a data-structure choice for a concrete application.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Foundations =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== What Is a Data Structure? ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;data structure&amp;#039;&amp;#039;&amp;#039; is a way of organizing and storing data together with the relationships and operations that make the data useful. Examples include arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs. The structure you choose affects how efficiently a program can search, insert, delete, traverse, prioritize, or connect data.&lt;br /&gt;
&lt;br /&gt;
A data structure is not the same thing as an algorithm. A data structure organizes data; an [[English:Algorithm|algorithm]] is a procedure for solving a problem. They work together. For example, binary search is an algorithm that takes advantage of ordered, indexable data, while breadth-first search is an algorithm that naturally uses a queue when traversing a graph.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Abstract Data Types and Implementations ==&lt;br /&gt;
&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;abstract data type&amp;#039;&amp;#039;&amp;#039;, or ADT, describes behavior from the user&amp;#039;s point of view. It specifies which operations are available and what those operations mean. A stack ADT, for example, supports adding an item to the top and removing the most recently added item. The ADT does not require one particular representation: a stack can be implemented with an array, a dynamic array, or a linked list.&lt;br /&gt;
&lt;br /&gt;
This distinction helps you reason at two levels. At the interface level, you ask what operations the program needs. At the implementation level, you ask how memory, links, indices, or hashing can support those operations.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=PmAI76OGE_E|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Measuring Efficiency with Big O ==&lt;br /&gt;
&lt;br /&gt;
[[English:Big O notation|Big O notation]] describes how the amount of work or memory grows as the input size grows. It is a growth-rate model rather than an exact stopwatch measurement. In introductory analysis, you often compare operations using the following broad classes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Growth&lt;br /&gt;
! Typical interpretation&lt;br /&gt;
! Example&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;O(1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Constant growth&lt;br /&gt;
| Accessing an array element by a valid index&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;O(log n)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Logarithmic growth&lt;br /&gt;
| Searching a balanced binary search tree&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;O(n)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Linear growth&lt;br /&gt;
| Scanning an unsorted list&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;O(n log n)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Linearithmic growth&lt;br /&gt;
| Typical efficient comparison sorting&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;O(n²)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Quadratic growth&lt;br /&gt;
| Comparing every pair in a simple nested-loop process&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Complexity depends on assumptions. A hash-table lookup is often described as average-case O(1), but collisions can make the worst case slower. A binary search tree can support O(log n) search when its height is logarithmic, but an unbalanced tree can become chain-like and require O(n) search.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Linear Data Structures =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Arrays and Dynamic Arrays ==&lt;br /&gt;
&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; stores elements in indexed positions. Because the address of an element can be calculated from its index, indexed access is typically O(1). In a fixed-size array, the number of available positions is determined when the array is created. A &amp;#039;&amp;#039;&amp;#039;dynamic array&amp;#039;&amp;#039;&amp;#039; keeps an underlying array but occasionally allocates a larger block and copies elements so that the logical sequence can grow.&lt;br /&gt;
&lt;br /&gt;
[[File:Array Representations.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Arrays are strong when you need fast indexed access and compact storage. They are less convenient when you repeatedly insert or delete near the front or middle, because later elements may have to shift. Dynamic arrays make appending efficient on average by growing capacity geometrically, but an individual resize can be expensive.&lt;br /&gt;
&lt;br /&gt;
A useful distinction is between &amp;#039;&amp;#039;&amp;#039;size&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;capacity&amp;#039;&amp;#039;&amp;#039;. Size is the number of elements currently stored. Capacity is the number of elements the underlying storage can hold before a resize is needed.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Linked Lists ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;linked list&amp;#039;&amp;#039;&amp;#039; stores data in nodes. Each node contains a value and one or more references to other nodes. In a singly linked list, each node usually points to the next node. In a doubly linked list, nodes also store a link to the previous node.&lt;br /&gt;
&lt;br /&gt;
[[File:LinkedListHsrw.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Linked lists do not provide constant-time access to an arbitrary position by index; reaching the kth node usually requires following links from the beginning. However, if you already have a reference to the relevant node or predecessor, insertion and deletion can often be performed without shifting many other elements. Linked structures therefore trade direct indexing for flexible connections.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Stacks ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;stack&amp;#039;&amp;#039;&amp;#039; follows the &amp;#039;&amp;#039;&amp;#039;last in, first out&amp;#039;&amp;#039;&amp;#039; principle. The most recently added item is the first one removed. The common operations are &amp;#039;&amp;#039;&amp;#039;push&amp;#039;&amp;#039;&amp;#039; to add an item, &amp;#039;&amp;#039;&amp;#039;pop&amp;#039;&amp;#039;&amp;#039; to remove the top item, and &amp;#039;&amp;#039;&amp;#039;peek&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;top&amp;#039;&amp;#039;&amp;#039; to inspect the top item without removing it.&lt;br /&gt;
&lt;br /&gt;
[[File:Data stack.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Stacks appear in expression evaluation, undo systems, depth-first search, and function-call management. A browser&amp;#039;s simple back-history model can also be explained with stack-like behavior, although real browsers use more complex structures.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Queues ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;queue&amp;#039;&amp;#039;&amp;#039; follows the &amp;#039;&amp;#039;&amp;#039;first in, first out&amp;#039;&amp;#039;&amp;#039; principle. Items enter at the rear and leave from the front. Common operations are &amp;#039;&amp;#039;&amp;#039;enqueue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;dequeue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Data Queue.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Queues are useful when order of arrival matters, such as print jobs, message processing, task scheduling, simulations, and breadth-first search. A circular buffer is an array-based queue implementation that reuses positions at the beginning of the array instead of repeatedly shifting elements.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Hash-Based Structures =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Hash Tables ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;hash table&amp;#039;&amp;#039;&amp;#039; stores key-value associations. A &amp;#039;&amp;#039;&amp;#039;hash function&amp;#039;&amp;#039;&amp;#039; maps a key to an index or bucket. If two keys map to the same location, a &amp;#039;&amp;#039;&amp;#039;collision&amp;#039;&amp;#039;&amp;#039; occurs. Collision-resolution strategies include separate chaining and open addressing.&lt;br /&gt;
&lt;br /&gt;
[[File:Hash table 5 0 1 1 1 1 1 LL.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
With a suitable hash function and a controlled load factor, insertion, lookup, and deletion are often O(1) on average. That average performance does not mean every operation is constant time. Poor hashing, too many collisions, or adversarial input can create much slower behavior.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=KyUTuwz_b7Q|500|center}}&lt;br /&gt;
&lt;br /&gt;
Hash tables are a natural choice for dictionaries, caches, symbol tables, sets, frequency counters, and fast membership tests. Their main strength is direct access by key rather than ordered traversal.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Trees and Heaps =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Trees ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;tree&amp;#039;&amp;#039;&amp;#039; is a hierarchical structure made of nodes connected by edges. A rooted tree has one distinguished root. Nodes may have children, and nodes with no children are called leaves. Trees model file systems, organization charts, syntax, menus, search indexes, and many other hierarchies.&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;binary tree&amp;#039;&amp;#039;&amp;#039; allows each node to have at most two children. A &amp;#039;&amp;#039;&amp;#039;binary search tree&amp;#039;&amp;#039;&amp;#039; additionally maintains an ordering rule: keys in the left subtree compare smaller than the node&amp;#039;s key, while keys in the right subtree compare larger, assuming distinct comparable keys.&lt;br /&gt;
&lt;br /&gt;
[[File:Binary search tree.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Search, insertion, and deletion depend on tree height. In a balanced binary search tree, height is O(log n), so these operations can also be O(log n). In the worst case, repeated insertion in an unfortunate order can produce a highly unbalanced tree with height O(n).&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Heaps and Priority Queues ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;priority queue&amp;#039;&amp;#039;&amp;#039; is an ADT in which removal returns an item with highest or lowest priority rather than simply the oldest item. A &amp;#039;&amp;#039;&amp;#039;binary heap&amp;#039;&amp;#039;&amp;#039; is a common implementation. It is a complete binary tree that satisfies a heap-order property.&lt;br /&gt;
&lt;br /&gt;
[[File:Heap-as-array.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
A binary heap is usually stored compactly in an array. For a zero-based array, the children of position i are commonly found at positions 2i + 1 and 2i + 2 when those positions exist. Insertion and removal of the extreme-priority element are O(log n), while inspecting that extreme element is O(1).&lt;br /&gt;
&lt;br /&gt;
Heaps are useful for schedulers, event simulations, shortest-path algorithms, and efficient top-k processing.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Graphs =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Vertices, Edges, and Representations ==&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;graph&amp;#039;&amp;#039;&amp;#039; represents entities as vertices and relationships as edges. Graphs may be directed or undirected, weighted or unweighted, connected or disconnected. They can model road networks, social connections, communication networks, prerequisite relationships, and web links.&lt;br /&gt;
&lt;br /&gt;
Two important representations are the &amp;#039;&amp;#039;&amp;#039;adjacency list&amp;#039;&amp;#039;&amp;#039; and the &amp;#039;&amp;#039;&amp;#039;adjacency matrix&amp;#039;&amp;#039;&amp;#039;. An adjacency list stores, for each vertex, the vertices connected to it. An adjacency matrix uses a two-dimensional table whose entries indicate whether pairs of vertices are connected.&lt;br /&gt;
&lt;br /&gt;
[[File:Graph for example adjacency matrix.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Adjacency lists are usually space-efficient for sparse graphs, where relatively few of the possible edges exist. Adjacency matrices use O(V²) space for V vertices but make an edge-existence test straightforward and constant time. The best representation depends on graph density and the operations the algorithm performs most often.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Traversing Graphs ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Breadth-first search&amp;#039;&amp;#039;&amp;#039; explores vertices in increasing distance from a starting point in an unweighted graph and naturally uses a queue. &amp;#039;&amp;#039;&amp;#039;Depth-first search&amp;#039;&amp;#039;&amp;#039; explores one path deeply before backtracking and can be implemented with recursion or an explicit stack.&lt;br /&gt;
&lt;br /&gt;
Both traversals run in O(V + E) time when the graph is stored as adjacency lists, where V is the number of vertices and E is the number of edges. Their traversal order differs, so they support different tasks. Breadth-first search can find shortest paths measured by number of edges in an unweighted graph, while depth-first search is useful for tasks such as cycle detection, connected-component exploration, and topological reasoning in directed acyclic graphs.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Choosing the Right Structure =&lt;br /&gt;
&lt;br /&gt;
There is no universally best data structure. You choose by identifying the operations that matter, the expected amount and shape of data, ordering requirements, memory constraints, and the guarantees your application needs.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Problem need&lt;br /&gt;
! Often suitable structure&lt;br /&gt;
! Reason&lt;br /&gt;
|-&lt;br /&gt;
| Fast access by numeric position&lt;br /&gt;
| Array or dynamic array&lt;br /&gt;
| Direct indexing is typically constant time&lt;br /&gt;
|-&lt;br /&gt;
| Frequent insertion through known links&lt;br /&gt;
| Linked list&lt;br /&gt;
| Nodes can be relinked without shifting a whole sequence&lt;br /&gt;
|-&lt;br /&gt;
| Most-recent item handled first&lt;br /&gt;
| Stack&lt;br /&gt;
| Last in, first out behavior matches the requirement&lt;br /&gt;
|-&lt;br /&gt;
| Arrival order must be preserved&lt;br /&gt;
| Queue&lt;br /&gt;
| First in, first out behavior matches the requirement&lt;br /&gt;
|-&lt;br /&gt;
| Fast lookup by key&lt;br /&gt;
| Hash table&lt;br /&gt;
| Average lookup can be constant time&lt;br /&gt;
|-&lt;br /&gt;
| Ordered searching and range-oriented structure&lt;br /&gt;
| Balanced search tree&lt;br /&gt;
| Ordering supports logarithmic navigation and sorted traversal&lt;br /&gt;
|-&lt;br /&gt;
| Repeated access to highest or lowest priority&lt;br /&gt;
| Heap-based priority queue&lt;br /&gt;
| Extreme element is available quickly&lt;br /&gt;
|-&lt;br /&gt;
| Arbitrary relationships and routes&lt;br /&gt;
| Graph&lt;br /&gt;
| Vertices and edges directly model networks&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A good justification names both the required operations and the trade-off. For example, saying &amp;quot;use a hash table because it is fast&amp;quot; is incomplete. A stronger argument is: &amp;quot;Use a hash table because the application performs many membership tests by unique key, does not need sorted iteration, and can tolerate average-case rather than strict worst-case constant lookup.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Implementation Thinking =&lt;br /&gt;
&lt;br /&gt;
When implementing a data structure, maintain its &amp;#039;&amp;#039;&amp;#039;invariants&amp;#039;&amp;#039;&amp;#039;: properties that must remain true after every operation. A binary search tree must preserve its ordering rule. A heap must preserve both completeness and heap order. A queue must remove items in the same order in which they entered unless the specification says otherwise.&lt;br /&gt;
&lt;br /&gt;
You should also test &amp;#039;&amp;#039;&amp;#039;boundary cases&amp;#039;&amp;#039;&amp;#039;: an empty structure, a structure with one element, duplicate keys if duplicates are allowed, full capacity in an array-based implementation, missing search targets, and repeated insertion or deletion. Testing these cases helps reveal pointer errors, incorrect index arithmetic, and broken invariants.&lt;br /&gt;
&lt;br /&gt;
Here is a short Python example that uses a list as a stack:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stack = []&lt;br /&gt;
stack.append(&amp;quot;first&amp;quot;)&lt;br /&gt;
stack.append(&amp;quot;second&amp;quot;)&lt;br /&gt;
top_item = stack.pop()&lt;br /&gt;
print(top_item)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final item added is removed first, so this code prints &amp;#039;&amp;#039;&amp;#039;second&amp;#039;&amp;#039;&amp;#039;. The important idea is the stack behavior, not the particular programming language.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Interactive Tasks =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Quiz: Test Your Knowledge ==&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which operation is typically constant time for an array?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Accessing an element by index)&lt;br /&gt;
(!Inserting at the front of a full array)&lt;br /&gt;
(!Searching an unsorted array by value)&lt;br /&gt;
(!Deleting every element)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What principle describes a stack?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Last in first out)&lt;br /&gt;
(!First in first out)&lt;br /&gt;
(!Smallest key first)&lt;br /&gt;
(!Random item first)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which operation removes the oldest item from a standard queue?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Dequeue)&lt;br /&gt;
(!Push)&lt;br /&gt;
(!Peek)&lt;br /&gt;
(!Hash)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Why can a hash table experience collisions?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Different keys can map to the same location)&lt;br /&gt;
(!Every key must be stored twice)&lt;br /&gt;
(!Arrays cannot store keys)&lt;br /&gt;
(!Trees always contain duplicate nodes)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What extra rule defines a binary search tree?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Keys are ordered between left and right subtrees)&lt;br /&gt;
(!Every node has exactly two children)&lt;br /&gt;
(!Every leaf has the same key)&lt;br /&gt;
(!Nodes are stored in arrival order)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which structure is commonly used to implement a priority queue efficiently?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Binary heap)&lt;br /&gt;
(!Singly linked cycle)&lt;br /&gt;
(!Plain text file)&lt;br /&gt;
(!Unsorted fixed record)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which graph traversal naturally uses a queue?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Breadth first search)&lt;br /&gt;
(!Depth first search)&lt;br /&gt;
(!Binary search)&lt;br /&gt;
(!Hash probing)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Why are adjacency lists often preferred for sparse graphs?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(They avoid storing most nonexistent edges)&lt;br /&gt;
(!They require one matrix cell for every vertex pair)&lt;br /&gt;
(!They sort every vertex automatically)&lt;br /&gt;
(!They guarantee constant time shortest paths)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What does Big O notation mainly describe?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(How resource use grows with input size)&lt;br /&gt;
(!The exact runtime in seconds)&lt;br /&gt;
(!The programming language syntax)&lt;br /&gt;
(!The number of comments in source code)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is an invariant in a data structure?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(A property that operations must preserve)&lt;br /&gt;
(!A value that must change after every operation)&lt;br /&gt;
(!A file that contains test data)&lt;br /&gt;
(!A random choice of memory address)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Memory Game ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;memo-quiz&amp;quot;&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Array || Indexed sequence with typically constant-time direct access&lt;br /&gt;
|-&lt;br /&gt;
| LinkedList || Nodes connected by stored references&lt;br /&gt;
|-&lt;br /&gt;
| Stack || Last-in-first-out collection&lt;br /&gt;
|-&lt;br /&gt;
| Queue || First-in-first-out collection&lt;br /&gt;
|-&lt;br /&gt;
| HashTable || Key-value structure based on a hash function&lt;br /&gt;
|-&lt;br /&gt;
| BinaryHeap || Complete tree structure used for priority queues&lt;br /&gt;
|-&lt;br /&gt;
| Graph || Vertices connected by edges&lt;br /&gt;
|-&lt;br /&gt;
| Invariant || Property that remains true after valid operations&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Drag and Drop ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;lueckentext-quiz&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Match the correct terms.&lt;br /&gt;
! Topic&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Direct indexed access&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Array&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Last in first out&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Stack&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;First in first out&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Queue&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Key mapped to bucket&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Hash table&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Vertices connected by edges&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Graph&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Crossword Puzzle ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;kreuzwort-quiz&amp;quot;&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Array || Which structure stores elements in indexed positions?&lt;br /&gt;
|-&lt;br /&gt;
| Stack || Which structure removes the most recently added item first?&lt;br /&gt;
|-&lt;br /&gt;
| Queue || Which structure removes items in arrival order?&lt;br /&gt;
|-&lt;br /&gt;
| Hashing || What process maps a key toward a table location?&lt;br /&gt;
|-&lt;br /&gt;
| Vertex || What is a node in a graph commonly called?&lt;br /&gt;
|-&lt;br /&gt;
| Pointer || What programming concept can store a reference to another memory location?&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== LearningApps ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;iframe&amp;gt; https://learningapps.org/index.php?s=Data+Structures &amp;lt;/iframe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Cloze Text ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;quiz display=simple&amp;gt;&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Complete the text.&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;}&lt;br /&gt;
An { array } supports direct access through an index. A { linked list } connects nodes through references. A stack follows the { last in first out } principle. A queue follows the { first in first out } principle. A { hash function } maps keys toward table locations. A balanced binary search tree can support search in { logarithmic time }. A graph represents entities as vertices connected by { edges }. Breadth-first search normally uses a { queue }. Big O notation describes how resource use { grows with input size }. An invariant is a property that valid operations must { preserve }.&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Open-Ended Tasks =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Easy ===&lt;br /&gt;
# [[English:Array visualization|Array visualization]]: Create a labeled diagram of an array with at least eight positions, show three example index accesses, and explain why direct indexing is efficient.&lt;br /&gt;
# [[English:Stack simulation|Stack simulation]]: Use cards or sticky notes to model push and pop operations, record the sequence of actions, and photograph or draw the final stack.&lt;br /&gt;
# [[English:Queue observation|Queue observation]]: Observe a real queue such as a cafeteria line or printer queue, describe where the first-in-first-out model fits, and note one way reality differs from the simplified model.&lt;br /&gt;
# [[English:Linked list diagram|Linked list diagram]]: Draw five linked nodes with data and next references, then show how the links change when one middle node is removed.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Standard ===&lt;br /&gt;
# [[English:Hash collision experiment|Hash collision experiment]]: Design a small hash function for classroom data, insert at least twelve keys, record collisions, and compare two collision-resolution strategies.&lt;br /&gt;
# [[English:Binary search tree model|Binary search tree model]]: Build a binary search tree from a chosen sequence of values, trace searches for three targets, and explain how insertion order changes tree height.&lt;br /&gt;
# [[English:Graph route project|Graph route project]]: Model a local transport or school-room network as a graph, create an adjacency list, and use breadth-first search reasoning to find a route with the fewest edges.&lt;br /&gt;
# [[English:Data structure interview|Data structure interview]]: Interview a programmer, IT specialist, or advanced computing student about one real data-structure choice, then summarize the problem, chosen structure, and trade-offs.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
# [[English:Complexity benchmark|Complexity benchmark]]: Implement or simulate two structures that solve the same lookup problem, collect timing or operation-count data at increasing input sizes, and interpret the pattern using Big O reasoning.&lt;br /&gt;
# [[English:Priority queue scheduler|Priority queue scheduler]]: Design a task scheduler based on a heap-backed priority queue, define how priorities are compared, test at least two tie cases, and justify the design.&lt;br /&gt;
# [[English:Graph algorithm video|Graph algorithm video]]: Produce a short instructional video that demonstrates breadth-first search and depth-first search on the same graph, highlighting how the queue and stack behaviors change traversal order.&lt;br /&gt;
# [[English:Data structure design portfolio|Data structure design portfolio]]: Choose a realistic application such as a game, library system, social network, or route planner, propose at least three interacting data structures, justify each choice, and discuss one alternative design.&lt;br /&gt;
&lt;br /&gt;
{{:Open Task - Create a MOOC}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Learning Assessment =&lt;br /&gt;
&lt;br /&gt;
# [[English:Structure selection assessment|Structure selection assessment]]: For a messaging system, compare a queue, stack, and priority queue, then justify which behavior is most appropriate under two different delivery policies.&lt;br /&gt;
# [[English:Complexity reasoning assessment|Complexity reasoning assessment]]: Given several operation counts for increasing input sizes, infer a plausible growth class and explain what additional evidence would make your conclusion stronger.&lt;br /&gt;
# [[English:Tree balance assessment|Tree balance assessment]]: Compare two insertion orders that produce different binary search tree shapes, predict their search costs, and propose a strategy that avoids severe imbalance.&lt;br /&gt;
# [[English:Hash table assessment|Hash table assessment]]: Analyze a collision-heavy hash table, identify whether the problem is caused by the hash function, load factor, or collision strategy, and recommend a justified improvement.&lt;br /&gt;
# [[English:Graph representation assessment|Graph representation assessment]]: Choose between an adjacency list and adjacency matrix for a sparse road network and a dense small network, explaining the time-space trade-off in each case.&lt;br /&gt;
# [[English:Transfer assessment|Transfer assessment]]: Design a data model for a new application of your choice and defend how at least two data structures cooperate to support the application&amp;#039;s most important operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Evidence of Learning =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Evidence type&lt;br /&gt;
! What successful learning can show&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Knowledge&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| You can explain the defining behavior, common operations, and typical uses of arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Reasoning&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| You can compare time and space trade-offs, distinguish average and worst cases, and connect performance claims to assumptions.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Skills&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| You can trace operations, maintain structural invariants, build small representations, and test boundary cases.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Products&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| You can produce diagrams, code, benchmarks, graph models, explanations, and a justified design portfolio.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Transfer&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| You can identify the operations required by an unfamiliar problem and choose or combine structures that support those operations appropriately.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= OERs on the Topic =&lt;br /&gt;
&lt;br /&gt;
The following English Wikipedia article provides an open reference overview of the topic:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;iframe&amp;gt; https://en.m.wikipedia.org/wiki/Data_structure &amp;lt;/iframe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Linked Learning Areas =&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
{{:D-Tab}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[English:Data Structures|Data Structures]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
# [[English:Array data structure|Arrays]]&lt;br /&gt;
# [[English:Linked list|Linked lists]]&lt;br /&gt;
# [[English:Stack data structure|Stacks]]&lt;br /&gt;
# [[English:Queue data structure|Queues]]&lt;br /&gt;
# [[English:Hash table|Hash tables]]&lt;br /&gt;
# [[English:Tree data structure|Trees]]&lt;br /&gt;
# [[English:Heap data structure|Heaps]]&lt;br /&gt;
# [[English:Graph data structure|Graphs]]&lt;br /&gt;
# [[English:Algorithm analysis|Algorithm analysis]]&lt;br /&gt;
# [[English:Computer programming|Programming]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Data structures connect directly with [[English:Algorithms|Algorithms]], [[English:Software engineering|Software engineering]], [[English:Database|databases]], [[English:Computer networks|Computer networks]], [[English:Artificial intelligence|Artificial intelligence]], [[English:Mathematics|Mathematics]], and [[English:Discrete mathematics|Discrete mathematics]]. They are especially important in programming courses because implementation choices determine how algorithms use memory and time.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= aiMOOC Projects =&lt;br /&gt;
[[Category:English]]&lt;br /&gt;
[[Category:Data Structures]]&lt;br /&gt;
[[Category:Computer Science]]&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Algorithms]]&lt;br /&gt;
[[Category:Grades 11-13]]&lt;br /&gt;
[[Category:AI_MOOC]]&lt;br /&gt;
[[Category:GPT aiMOOC]]&lt;br /&gt;
{{MT}}&lt;/div&gt;</summary>
		<author><name>Glanz</name></author>
	</entry>
</feed>