DSA14 min readDSA in Java · Part 1 · FoundationsLesson 1 of 34 On this page (12 sections) 🎯 Why Do We Need Data Structures and Algorithms? 1️⃣ What Is a Data Structure? 2️⃣ What Is an Algorithm? 3️⃣ Data Structures and Algorithms Work Together 4️⃣ Why It Matters: Speed 5️⃣ The Basic Operations on Data 6️⃣ […]
C Programming14 min readC Programming · Part 7 · PointersLesson 29 of 29 On this page (14 sections) 🎯 Why Do We Need Pointers? 1️⃣ Memory and Addresses 2️⃣ What Is a Pointer? 3️⃣ Declaring and Initializing a Pointer 4️⃣ A Pointer Type Must Match the Data Type 5️⃣ How Big Is a Pointer? 6️⃣ Start Safe: the […]
C Programming14 min readC Programming · Part 6 · Functions and ScopeLesson 28 of 29 On this page (15 sections) 🎯 Why Pass Arrays to Functions? 1️⃣ Passing a Single Element 2️⃣ Passing the Whole Array 3️⃣ The Big Difference: The Function Can Change the Original 4️⃣ Why the Size Must Be Passed Separately 5️⃣ Searching: Linear Search […]
C Programming13 min readC Programming · Part 6 · Functions and ScopeLesson 27 of 29 On this page (13 sections) 🎯 Why Does Parameter Passing Matter? 1️⃣ Actual and Formal Parameters 2️⃣ Call by Value in Action 3️⃣ Proof: Two Different Memory Boxes 4️⃣ Expressions and Constants as Arguments 5️⃣ Getting a Changed Value Back: return 6️⃣ Why […]
Java Programming9 min readYou started by asking “What is Java?” and you now know the building blocks of the language. This final lesson does two things: it gives you a revision map of the…
Java Programming5 min readLook around: a student, a book, a bank account. Each has data (name, price, balance) and actions (display, withdraw). Java organises programs around such things,…
Java Basics10 min readIn earlier lessons you saw programs crash with messages like ArithmeticException or NumberFormatException. These crashes are called exceptions. Instead of letting the…
Java Basics10 min readAn array has a fixed size. If you do not know how many marks, names or messages you will receive, you have to guess a size in advance. ArrayList solves this: it is a…
Java Basics9 min readImagine standing in a queue and wanting to know your position. You ask the person ahead: “What is your position?” They ask the next person, and so on, until the first…
Java Basics10 min readYou have written all your code inside main so far. Long programs written that way become impossible to read. A method is a named block of code that does one job. You…