Algorithms in Five Levels
- 30Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is an algorithm?
A step-by-step set of instructions for solving a problem.
Or swipe the card
30 cards
What is an algorithm?
A step-by-step set of instructions for solving a problem.
Why is precision important in algorithms?
Imprecise instructions can lead to incorrect results or unexpected behavior, as demonstrated when making a peanut butter sandwich.
What is the CPU?
The Central Processing Unit, the brain of the computer that responds to instructions and performs math.
What is the difference between RAM and a hard drive (or SSD)?
RAM (random access memory) is temporary storage for active programs; hard drive/SSD is permanent storage that retains data even when power is off.
What is a loop in programming?
A construct that repeats a block of instructions multiple times.
Give an example of an algorithm from everyday life.
A bedtime routine: get dressed, brush teeth, read a story, go to bed.
How does a computer store high scores or documents permanently?
On a hard drive or solid-state drive (non-volatile memory).
What is linear search?
Starting at the beginning and checking each item one by one until the target is found.
What is binary search?
Repeatedly dividing a sorted list in half, discarding the half that cannot contain the target, until the target is found.
How many steps does binary search take on a list of 1000 elements?
About 10 steps (since 210=1024).
What is divide and conquer in algorithms?
A strategy where a problem is broken into smaller subproblems, solved independently, and combined to solve the overall problem.
What is a recursive algorithm?
An algorithm that calls itself to solve smaller instances of the same problem.
Describe the bubble sort algorithm.
Repeatedly step through the list, compare adjacent elements, and swap them if they are in the wrong order. The largest element "bubbles" to the end after each pass.
Why do we need multiple passes in bubble sort?
Each pass only moves the largest unsorted element to its correct place; subsequent passes are needed to sort the remaining elements.
Why is sorting data useful for searching?
Sorted data allows for faster search algorithms like binary search, which rely on order.
What is machine learning?
A field of AI where algorithms learn patterns from data without being explicitly programmed for every rule.
What are neural networks?
Computing systems inspired by biological neural networks that consist of layers of interconnected nodes (neurons) and can learn complex patterns.
How do deepfakes work?
Deepfakes use machine learning, particularly generative models, to synthesize realistic video or audio of people by learning from large datasets of their appearance and voice.
What is an objective function in machine learning?
A function that defines what the algorithm should optimize for (e.g., minimize error, maximize reward).
What is reinforcement learning? Give an example.
A type of machine learning where an agent learns by interacting with an environment and receiving rewards or penalties. Example: AlphaZero learning to play Go or chess.
What is the difference between supervised and unsupervised learning?
Supervised learning uses labeled data (input-output pairs) to learn a mapping; unsupervised learning finds patterns in unlabeled data (e.g., clustering).
How does TikTok's recommendation algorithm work?
It analyzes user behavior (likes, saves, searches) and infers preferences using machine learning to personalize the "For You" page.
What is the hierarchy from AI to LLMs to chatbots?
AI is the broad field; machine learning is a subset; large language models (LLMs) are a type of machine learning; generative AI includes LLMs; chatbots are a specific application of generative AI.
What is data science in industry?
Developing and deploying algorithms as data products, including understanding statistical performance, systems integration, and organizational integration.
What is a data product?
An algorithm that is integrated into a system to provide useful outputs (e.g., personalization, recommendations).
What is a large language model (LLM)?
A machine learning model trained on vast text corpora to predict the next word or token given a sequence.
What does "pre-training" and "fine-tuning" mean for LLMs?
Pre-training is training an LLM on a large general corpus; fine-tuning is adapting it to a specific task or domain with additional training.
State Kranzberg's first law of technology.
"Technology is neither good nor bad; nor is it neutral."
Why do fundamentals of algorithms still matter when we have tools like ChatGPT?
Understanding the underlying principles allows one to innovate and use tools effectively; the fundamentals are the foundation for advanced algorithms.
What is the role of an optimization algorithm in data science?
It helps find the best model or description of a dataset by minimizing an objective function.

Ask anything
We've read this whole study set, so questions about it get the best answers.