Topic 4 is the core programming topic: computational thinking, algorithm design, and implementation using pseudocode (and a language of choice for the IA). It covers fundamental data structures and classic algorithms.
Decomposition: breaking problems into smaller sub-problems. Pattern recognition: identifying similarities. Abstraction: focusing on essential details, ignoring irrelevant ones. Algorithm design: step-by-step instructions to solve a problem. Representing algorithms: pseudocode, flowcharts, trace tables for debugging.
Variables and constants. Data types: integer, real, boolean, string, char. Input and output. Selection: if-then-else, nested conditions. Iteration: for loops (counter-controlled), while loops (condition-controlled). Arrays: fixed-size collections with index access. Collections: dynamic-size lists. Strings: character sequences, manipulation (length, substring, concatenation).
Linear search: check each element sequentially; O(n). Binary search: divide sorted array in half repeatedly; O(log n). Bubble sort: compare adjacent pairs, swap if needed, repeat; O(n²). Selection sort: find minimum, swap to front, repeat; O(n²). Insertion sort: insert each element into correct position in sorted portion; O(n²). Merge sort (HL): divide-and-conquer; O(n log n).
Functions: return a value. Procedures: perform an action without returning. Parameters: pass data to sub-programs (by value, by reference). Benefits of modularity: reusability, readability, easier testing, team collaboration. Recursion: a sub-program that calls itself (needs base case and recursive case). Examples: factorial, Fibonacci, tree traversal.
Paper 1 uses IB pseudocode (Java-like syntax defined in the IB CS guide). You must be able to read and write IB pseudocode. Paper 2 (HL) uses Java specifically. For the Internal Assessment (IA), you can use any programming language (Java, Python, JavaScript, etc.). Most schools teach Java because it aligns with Paper 2, but the pseudocode in Paper 1 is language-agnostic and is clearly defined in the syllabus guide.
Book a Trial + Diagnostic session. Get a personalized Learning Path with clear milestones, tutor match, and a plan recommendation — all within 24 hours.
Book Trial + Diagnostic →