

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Data Structures and Algorithms
incomplete
2: Find Minimum
incomplete
3: Simple Algorithms
incomplete
4: What Is an Algorithm?
incomplete
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The terms "data structures" and "algorithms" (DSA) were designed to scare young CS students into eating their vegetables. But after this course, you'll see there's nothing to fear.
An "algorithm" is just a set of instructions for solving a problem. Here's a simple one for adding two numbers:
Start with input variables a and b
Add a and b using the + operator, and assign the result to a new variable, total
Return the total variable
Data structures are just organizational tools that let you write more advanced algorithms... more on them later.
Complete the add algorithm function on the right. It should return the sum of a and b.