CS50 Introduction to CS
- 76Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is CS50 primarily about, according to Harvard University's introduction?
CS50 is about computer science and the art of programming, focusing on algorithmic thinking and efficient problem-solving.
Or swipe the card
76 cards
What is CS50 primarily about, according to Harvard University's introduction?
CS50 is about computer science and the art of programming, focusing on algorithmic thinking and efficient problem-solving.
Who teaches CS50 at Harvard University?
David Malan teaches CS50.
What is the core definition of problem-solving in computer science?
Problem-solving in computer science is the process of taking input, performing some operation, and producing output. This requires methodical, precise, and careful thinking.
How do computers primarily operate and what digits do they use?
Computers operate on binary, using only two digits: 0 and 1.
What do the digits 0 and 1 represent in the context of computer hardware?
The digits 0 and 1 represent the 'off' or 'on' states of transistors, which act as tiny switches.
How do patterns of zeros and ones convey meaning in computers?
Different patterns of zeros and ones represent different numbers, letters, colors, and instructions.
What are the characteristics of the Decimal number system?
The Decimal system (Base 10) uses ten digits (0-9). Its place values are powers of 10 (ones, tens, hundreds).
What are the characteristics of the Binary number system?
The Binary system (Base 2) uses two digits (0, 1). Its place values are powers of 2 (1, 2, 4, 8, etc.).
What is Hexadecimal (Base 16) used for, and what symbols does it employ?
Hexadecimal (Base 16) is used for representing data more compactly than binary. It uses digits 0-9 and letters A-F.
How do computers represent numbers?
Computers represent numbers using binary patterns, where place values are powers of 2.
What standard is used to map numbers to letters, punctuation, and control characters?
ASCII (American Standard Code for Information Interchange) is used to map numbers to letters, punctuation, and control characters.
What is the standardized ASCII value for the capital letter 'A'?
The standardized ASCII value for the capital letter 'A' is 65.
What do different file formats (e.g., JPEG, MP4, .docx) provide for patterns of zeros and ones?
Different file formats provide context for how patterns of zeros and ones should be interpreted (as images, text, video, etc.).
What is Unicode, and how does it differ from ASCII?
Unicode is a superser of ASCII that uses more bits (16 or 32) to represent a much wider range of characters, including those from different languages and emojis.
How are colors typically represented in computers?
Colors are typically represented using RGB (Red, Green, Blue) values, where each color component can range from 0 to 255 (or a binary pattern of 8 bits).
How are videos represented in binary?
Videos are represented as sequences of images over time, ultimately encoded in binary.
How is audio represented in binary?
Audio is represented as sequences of musical notes with durations and volumes, ultimately encoded in binary.
Define an algorithm.
An algorithm is a set of step-by-step instructions for solving a problem.
What are the two key criteria for a good algorithm?
The two key criteria for a good algorithm are correctness and efficiency.
What does correctness mean for an algorithm?
An algorithm must solve the problem accurately.
What does efficiency mean for an algorithm?
An algorithm should solve the problem using minimal resources (time, space).
What is Big O Notation used for?
Big O Notation is a way to describe the running time of an algorithm, focusing on the dominant term as the input size (n) grows large.
Describe an algorithm with O(1) time complexity.
An algorithm with O(1) time complexity runs in constant time, meaning its execution time does not change regardless of the input size.
Describe an algorithm with O(log n) time complexity.
An algorithm with O(log n) time complexity runs in logarithmic time, meaning its execution time increases slowly as the input size (n) grows. It often involves operations that halve the problem size in each step.
Describe an algorithm with O(n) time complexity.
An algorithm with O(n) time complexity runs in linear time, meaning its execution time grows proportionally with the input size (n).
Describe an algorithm with O(n²) time complexity.
An algorithm with O(n²) time complexity runs in quadratic time, meaning its execution time grows with the square of the input size (n).
What is Pseudocode?
Pseudocode is a way to express algorithms using English-like language before writing actual code.
What is the purpose of functions in programming?
Functions are reusable blocks of code that perform specific actions, often taking inputs (arguments/parameters) and producing outputs (return values or side effects).
What do conditionals allow programs to do?
Conditionals allow programs to make decisions based on Boolean expressions (true/false, yes/no).
What is the purpose of loops in programming?
Loops allow programs to repeat actions multiple times.
What are variables in programming?
Variables are named storage locations for data that can change during program execution. They have data types (e.g.,
int,char,float,string).What is the function of pointers in programming, especially in languages like C?
Pointers are variables that store memory addresses, allowing direct manipulation of memory locations.
Describe an array as a data structure.
Arrays are contiguous blocks of memory storing multiple values of the same data type, accessed via an index starting from 0.
How do linked lists store data?
Linked lists are data structures where each element (node) stores data and a pointer to the next element, allowing for dynamic resizing.
What are trees in the context of data structures, and for what are they used?
Trees are hierarchical data structures, like binary search trees, where nodes have at most two children (left and right), used for efficient searching.
What are Hash Tables (Dictionaries) and how do they work?
Hash Tables (Dictionaries) are data structures that map keys to values, providing fast average-case lookup. They use hash functions to determine storage locations.
What are Tries and what are they efficient for?
Tries are tree-like structures where nodes represent characters, efficient for prefix-based searches (e.g., autocomplete).
What principle do Queues follow?
Queues are data structures that follow a First-In, First-Out (FIFO) principle.
What principle do Stacks follow?
Stacks are data structures that follow a Last-In, First-Out (LIFO) principle.
What is debugging in software development?
Debugging is the process of finding and fixing errors (bugs) in code.
Name two common techniques or tools used for debugging.
Common debugging techniques include using
printfstatements for temporary output and dedicated debugging tools (likedebug50orgdb).What is the purpose of Text Editors/IDEs in software development?
Text Editors/IDEs (Integrated Development Environments) are tools like VS Code used for writing code.
What is the function of a compiler?
A compiler is a program that translates source code (human-readable) into machine code (binary).
Which compiler is mentioned for the C language, and what utility automates compilation?
clangis a C compiler, andmakeis a utility that automates compilation.What is a Command Line Interface (CLI)?
A Command Line Interface (CLI) is a text-based interface for interacting with the computer.
What does HTML stand for and what is its role in web development?
HTML stands for HyperText Markup Language, and it defines the structure of web content using tags and attributes.
What does CSS stand for and what is its role in web development?
CSS stands for Cascading Style Sheets, and it defines the presentation and aesthetics of web pages, controlling layout, colors, fonts, etc.
How does JavaScript contribute to web pages?
JavaScript adds interactivity and dynamic behavior to web pages, allowing manipulation of the DOM (Document Object Model) in response to user events.
What is HTTP and what is its primary function?
HTTP stands for Hypertext Transfer Protocol, and it is the protocol used for communication between web browsers (clients) and web servers.
What does a URL (Uniform Resource Locator) include?
A URL includes the protocol (HTTP/HTTPS), hostname, path, and query parameters (key-value pairs).
What are the two common HTTP Verbs mentioned and their uses?
The common HTTP Verbs are GET (retrieves data) and POST (sends data).
What do HTTP Status Codes indicate?
HTTP Status Codes are numbers returned by the server indicating the result of a request (e.g., 200 OK, 404 Not Found, 500 Internal Server Error).
What are HTTP Headers?
HTTP Headers are key-value pairs exchanged between client and server to convey metadata (e.g., Content-Type, Set-Cookie).
What are Cookies/Sessions used for in web development?
Cookies/Sessions are mechanisms to maintain state across HTTP requests, allowing websites to remember users and manage things like login status and shopping carts.
What are Frameworks (e.g., Flask) in web development?
Frameworks are collections of libraries and conventions that simplify development by providing pre-written code for common tasks like routing, templating, and handling requests.
How do relational databases (SQL) store data?
Relational databases store data in tables with structured schemas (columns with specific data types).
What does SQL stand for and what is its purpose?
SQL stands for Structured Query Language, and it is used to interact with relational databases.
What are the CRUD Operations in database management?
The CRUD Operations are Create, Read, Update, Delete data.
What are the basic components of a relational database?
The basic components of a relational database are tables, columns, and rows.
Name common data types found in SQL databases.
Common SQL data types include
INT(integers),TEXT(strings),NUMERIC(exact decimal numbers),REAL(floating-point numbers), andBLOB(binary large objects).What is a Primary Key in a relational database?
A Primary Key is a unique identifier for rows in a table.
What is a Foreign Key in a relational database?
Foreign Keys are columns in one table that reference the primary key of another table, establishing relationships.
What is the purpose of a JOIN operation in SQL?
A JOIN operation in SQL is used for combining data from multiple tables based on common keys.
What are Indexes in databases and how do they function?
Indexes are data structures (like B-trees) that speed up data retrieval by optimizing searches on specific columns.
What is SQL injection?
SQL injection is a security vulnerability where attackers insert malicious SQL code into user input to trick the database into performing unintended actions.
What is cross-site request forgery (CSRF)?
Cross-site request forgery (CSRF) is a vulnerability where attackers trick users into unwanted actions via malicious links or embedded content.
Define abstraction in computer science.
Abstraction is the concept of building higher-level concepts or tools (like functions, libraries, frameworks, data structures) to simplify complex underlying processes.
What is a key benefit of abstraction for programmers?
Abstraction allows programmers to focus on solving problems rather than low-level implementation details, and promotes code reuse.
What is the core idea behind computer science as taught by CS50?
Computer science is fundamentally about problem-solving using logical and methodical approaches, not just programming in isolation.
Why is understanding binary representation fundamental in computer science?
Understanding how data is represented in binary is fundamental because computers natively operate using binary digits (0s and 1s).
Why is the efficiency of algorithms, described by Big O notation, crucial?
The efficiency of algorithms is crucial for large datasets because it determines how well an algorithm scales in terms of time and space resources.
How do programming languages help implement algorithms?
Programming languages provide tools like functions, loops, conditionals, and data structures to implement algorithms.
Why is memory management important in lower-level languages like C?
Memory management (using
malloc,free, and pointers) is important in lower-level languages like C because they provide direct control over memory allocation and deallocation.In what languages is memory management abstracted away?
Memory management is often abstracted away in higher-level languages like Python.
Why is debugging considered an essential skill in programming?
Debugging is an essential skill because it involves systematic approaches to find and fix errors in code, which are inevitable.
What factors influence the choice of a data structure and algorithm for a problem?
The choice of the right data structure and algorithm depends on the problem's constraints and requirements, specifically time vs. space complexity.

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