Click a lesson or an exercise to open it in a new tab.
Units 1, 2 — Fundamentals
Chapter 1 — Introduction to Computer Science
| Demonstrating the importance of computer science through computational challenges across domains | — | — | — |
|---|---|---|---|
| Understanding simple computational tasks: analyzing the task, formulating an algorithmic solution | — | — | — |
| Understanding the concept of a programming language | — | — | — |
| Understanding the concept of a program: reading, writing, running, testing, and fixing simple programs | lesson | exercise | download |
| Class and main method as the basic framework for writing a program | lesson | exercise | download |
| Understanding the concept of an object | lesson | exercise | download |
| Reading and understanding a simple class interface to create objects and call methods on them | lesson | exercise | download |
| Creating objects using the new keyword | lesson | exercise | download |
| Calling and executing methods on objects | lesson | exercise | download |
Chapter 2 — Basic Programming Concepts
| Algorithm | lesson | exercise | download |
|---|---|---|---|
| Variable / Attribute | lesson | exercise | download |
| Class, attributes and methods | lesson | exercise | download |
| Basic data types: integer (int) | lesson | exercise | download |
| Basic data types: decimal (double) | lesson | exercise | download |
| Reading a decimal value from the user; constants (final) | lesson | exercise | download |
| Value ranges of data types | lesson | exercise | download |
| Assignment statements | lesson | exercise | download |
| Defining and initializing variables | lesson | exercise | download |
| Arithmetic operators: addition, subtraction, multiplication, division, modulo | lesson | exercise | download |
| Basic math methods: abs, max, min, pow, round, sqrt, random | lesson | exercise | download |
| Arithmetic expressions: operator precedence and the role of parentheses | lesson | exercise | download |
| Basic type conversion between int and double | lesson | exercise | download |
| Methods as a tool for refining and dividing tasks | lesson | exercise | download |
| Defining and writing a helper method (private method) | lesson | exercise | download |
| Defining parameters, passing by value (call by value) | lesson | exercise | download |
| Return value | lesson | exercise | download |
| Logic errors, syntax errors, runtime errors | lesson | exercise | download |
| Simple input/output operations and string concatenation | lesson | exercise | download |
| Trace table | — | — | — |
| Animate Line, keyboard Input | lesson | exercise | download |
Chapter 3 — Conditional Execution
| The boolean data type | lesson | exercise | download |
|---|---|---|---|
| Relational operators: equal, not equal, greater, less, greater or equal, less or equal | lesson | exercise | download |
| Pitfalls of using == and != with decimal values | lesson | exercise | download |
| Boolean operators (and, or, not) and their truth tables | lesson | exercise | download |
| Simple and complex boolean expressions, and boolean operator precedence | lesson | exercise | download |
| Conditional execution: if | lesson | exercise | download |
| Conditional execution: if .. else | lesson | exercise | download |
| Algorithms with conditional execution | lesson | exercise | download |
| Nested conditions | lesson | exercise | download |
| Boolean methods: calling them on objects, writing them, and using the returned value in an if | lesson | exercise | download |
| Input validation, simple input filter using a condition | lesson | exercise | download |
Chapter 4 — Repetitive Execution
| Repetitive execution | — | — | — |
|---|---|---|---|
| The for loop | lesson | exercise | download |
| The while loop | lesson | exercise | download |
| The equivalence of the for and while loops | lesson | exercise | download |
| Persistent input filter | lesson | exercise | download |
| Typical computation tasks: counters, accumulators, extreme values | lesson | exercise | download |
| Termination condition | lesson | exercise | download |
| Infinite execution | lesson | exercise | download |
| Correctness analysis using a trace table | — | — | — |
| Efficiency analysis by counting iterations | lesson | exercise | download |
| Nesting and combining if, for, while structures | lesson | exercise | download |
| Documentation | lesson | exercise | download |
Chapter 5 — Sequential Data Structures
| Arrays of basic data types | lesson | exercise | download |
|---|---|---|---|
| Core concepts: index, length, element access (x[i]) | lesson | exercise | download |
| Defining and initializing arrays | lesson | exercise | download |
| The memory model of an array: new, null and references | lesson | exercise | download |
| Going out of the bounds of an array | lesson | exercise | download |
| Array processing methods: sum, count, average, max/min, property check | lesson | exercise | download |
| For-each loop (enhanced for) | lesson | exercise | download |
| Sequential search | lesson | exercise | download |
| Binary search | lesson | exercise | download |
| Insertion sort | lesson | exercise | download |
| Merge (with and without duplicates) | lesson | exercise | download |
| Discussion and comparison of algorithm efficiency | lesson | exercise | download |
| Array of objects | lesson | exercise | download |
| Building an array of objects (using new) | lesson | exercise | download |
| Two-dimensional array: diagonals and transposition | lesson | exercise | download |
| Two-dimensional array: scanning by rows and by columns | lesson | exercise | download |
| Two-dimensional array: scanning in a spiral; flipping | lesson | exercise | download |
| Accessing an object's attribute in a two-dimensional array | lesson | exercise | download |
Chapter 6 — Object-Oriented Programming
| Review: creating and operating objects using a given class interface | lesson | exercise | download |
|---|---|---|---|
| Core concepts: class as a template for creating and operating objects; use vs. implementation | lesson | exercise | download |
| Core concepts: attributes, constructors, methods (queries / commands) | lesson | exercise | download |
| Object state, valid state | lesson | exercise | download |
| Encapsulation: importance of the principle and how it is implemented via access modifiers and appropriate methods | lesson | exercise | download |
| Immutable objects | lesson | exercise | download |
| Trace table of objects | lesson | exercise | download |
| Pre-condition / post-condition | lesson | exercise | download |
| Classes that use other classes | lesson | exercise | download |
| Implementing a class in a programming language according to a given interface | lesson | exercise | download |
| Documenting interfaces | lesson | exercise | download |
| Writing test programs | lesson | exercise | download |
| Inheritance In API | lesson | exercise | download |
| 2D Animation | lesson | exercise | download |
Unit 4 — Data Structures
Chapter 1 — Recursion
| Recursive definition, stop condition, recursive call | lesson | exercise | download |
|---|---|---|---|
| Tracing a recursive process at the level of f(n) and f(n-1) | lesson | exercise | download |
| Recursive operations on numbers; operations that return a value and operations that do not | lesson | exercise | download |
| Types of recursion: tail recursion, going-and-returning recursion | lesson | exercise | download |
| From an iterative solution to a recursive one | lesson | exercise | download |
| Double recursion, mutual recursion | lesson | exercise | download |
| Recursive operations on one-dimensional and two-dimensional arrays | lesson | exercise | download |
| The role of the parameters: parameters that change between calls and parameters that do not | lesson | exercise | download |
| The importance of the stop condition | lesson | exercise | download |
| Advantages of recursion (a simple solution, a proof of correctness) and its disadvantages (memory and time) | lesson | exercise | download |
Chapter 2 — Introduction to Efficiency
| A review of arrays and algorithms from the fundamentals: sequential search, binary search, insertion sort | lesson | exercise | download |
|---|---|---|---|
| Input size, basic step, operations that depend on the input size and operations that do not | lesson | exercise | download |
| Run time: the worst case, the best case, the average case | lesson | exercise | download |
| Efficiency as a function of the input size; order of growth (big O): constant, logarithmic, linear, quadratic, exponential | lesson | exercise | download |
| Improving the order of growth, and improving by a constant | lesson | exercise | download |
| Merge sort, and its analysis | lesson | exercise | download |
Chapter 3 — Stack
| Using the library of the unit: compiling it, and running a lesson with it | lesson | exercise | download |
|---|---|---|---|
| Abstract data type | lesson | exercise | download |
| Stack, LIFO | lesson | exercise | download |
| Class interface: constructors, operations that return a value, update operations | lesson | exercise | download |
| Solving problems with the StackInt interface: size, sum and copy | lesson | exercise | download |
| Solving problems with the StackInt interface: the bottom of a stack, reversing | lesson | exercise | download |
| Genericity | lesson | exercise | download |
| Solving problems with the Stack<T> interface: balanced brackets, undo | lesson | exercise | download |
| Solving problems with the Stack<T> interface: splitting by a range, recursion on a stack | lesson | exercise | download |
Chapter 4 — Queue
| Queue, FIFO, common uses | lesson | exercise | download |
|---|---|---|---|
| The Queue<T> interface, and working with it | lesson | exercise | download |
| Problems with a FIFO pattern, and writing code that solves them: size, copy, splitting by a range | lesson | exercise | download |
| Problems with a FIFO pattern, and writing code that solves them: merging sorted queues, recursion on a queue | lesson | exercise | download |
| Choosing the model for solving a problem: a queue or a stack? | lesson | exercise | download |
Chapter 5 — Linked List
| Pointer, reference; static and dynamic memory allocation | lesson | exercise | download |
|---|---|---|---|
| Node and list; the class Node<T> | lesson | exercise | download |
| Building and processing lists: going over a list, insertion, deletion, search by value or by position | lesson | exercise | download |
| Recursive algorithms on lists; their efficiency; a list compared with an array | lesson | exercise | download |
| The class BinNode<T>: a list of binary nodes | lesson | exercise | download |
| The implementation of Node and BinNode | lesson | exercise | download |
| Encapsulation and exposure | lesson | exercise | download |
Chapter 6 — Implementing Data Structures
| Implementing abstract data types: one abstraction, several implementations | lesson | exercise | download |
|---|---|---|---|
| Implementing a stack with an array | lesson | exercise | download |
| Implementing a stack with a list | lesson | exercise | download |
| The efficiency of the implementations | lesson | exercise | download |
| Implementing a queue with a list | lesson | exercise | download |
| Implementing compound data structures: an array of lists, an array of queues | lesson | exercise | download |
| Implementing an abstract data type with a compound structure: a line by urgency, as an array of queues | lesson | exercise | download |
Chapter 7 — Binary Trees
| The structure of trees, and their terms | lesson | exercise | download |
|---|---|---|---|
| The binary node as the building block of binary trees | lesson | exercise | download |
| The interface of BinNode, and building trees with it | lesson | exercise | download |
| Traversing trees: pre-order, in-order, post-order | lesson | exercise | download |
| Recursive implementation of algorithms on trees, and their efficiency | lesson | exercise | download |
| Depth-first and breadth-first traversal | lesson | exercise | download |
| Representing an arithmetic expression in a binary tree | lesson | exercise | download |
| Binary search tree: insertion | lesson | exercise | download |
| Binary search tree: search, and the efficiency of search and insertion | lesson | exercise | download |
| Algorithms on binary search trees: insertion with a loop, the path of a search, tree sort | lesson | exercise | download |