All Flashcards
Compare creating a new algorithm vs. using an existing one.
New: More work, potentially tailored | Existing: Faster, less debugging, may not perfectly fit.
Compare Bubble Sort and Selection Sort.
Bubble Sort: Repeatedly compares adjacent elements | Selection Sort: Finds the minimum element and swaps it.
Compare the advantages of different sorting algorithms.
Some are faster for nearly sorted data, others have better average-case performance.
Compare the disadvantages of different sorting algorithms.
Some have poor worst-case performance, others require significant memory overhead.
Compare the efficiency of different search algorithms.
Linear search is simple but slow; binary search is faster but requires sorted data.
Compare iterative and recursive algorithms.
Iterative: Uses loops | Recursive: Calls itself; can be more elegant but may have overhead.
Compare the use of arrays and linked lists for storing data.
Arrays: Fixed size, fast access | Linked Lists: Dynamic size, slower access.
Compare the best-case and worst-case scenarios for an algorithm.
Best-case: Most efficient execution | Worst-case: Least efficient execution.
Compare the time complexity and space complexity of an algorithm.
Time complexity: How execution time grows with input size | Space complexity: How memory usage grows with input size.
Compare the use of divide-and-conquer algorithms vs. dynamic programming.
Divide-and-conquer: Breaks problem into independent subproblems | Dynamic programming: Solves overlapping subproblems only once.
Define algorithm.
A set of steps to accomplish a task.
What does 'efficiency' mean in the context of algorithms?
A measure of how well an algorithm uses resources (time, memory).
Define 'debugging'.
The process of finding and fixing errors in code.
What is data compression?
Reducing the size of data for efficient storage or transmission.
What is 'academic integrity'?
Honesty and responsibility in scholarly work; includes citing sources.
Define 'trade-off' in algorithm selection.
Balancing different factors like speed, memory usage, and complexity when choosing an algorithm.
What is a 'sorting algorithm'?
An algorithm that arranges items in a specific order (e.g., numerical, alphabetical).
Define 'route-finding algorithm'.
An algorithm that determines the best path between two points.
What is 'algorithm design'?
The process of creating and planning an algorithm to solve a specific problem.
What is a 'minimum value algorithm'?
An algorithm that finds the smallest value in a set of data.
How are sorting algorithms used in real-world applications?
Database management systems, search engines, and e-commerce platforms use sorting algorithms.
How are route-finding algorithms used in real-world applications?
GPS navigation systems, logistics and transportation planning, and network routing.
How is data compression used in real-world applications?
Image and video storage, file archiving, and network communication.
How are algorithms used in search engines?
To crawl the web, index content, and rank search results.
How are algorithms used in social media platforms?
To recommend content, personalize ads, and detect fake accounts.
How are algorithms used in medical diagnosis?
To analyze medical images, predict disease risk, and personalize treatment plans.
How are algorithms used in financial modeling?
To predict market trends, manage risk, and detect fraud.
How are algorithms used in robotics?
To control robot movements, perceive the environment, and make decisions.
How are algorithms used in weather forecasting?
To analyze weather data, simulate atmospheric conditions, and predict future weather patterns.
How are algorithms used in cybersecurity?
To detect and prevent cyberattacks, encrypt data, and authenticate users.