introduction Flashcards
What is a data structure?
a way of organising, storing and managing data to enable efficient access and modification
What are the key characteristics of an algorithm?
well-defined inputs/outputs, definiteness, finiteness, effectiveness, and correctness.
What is an Abstract Data Type?
A mathematical model for data structures defining possible operations but not their implementation.
What is the difference between an algorithm and a heuristic?
An algorithm is a precise set of steps to solve a problem, while a heuristic is a general rule of thumb used to find an approximate solution faster.
What are the three key properties of a good algorithm?
Correctness, Efficiency, and Readability.
Why is algorithm efficiency important?
Because inefficient algorithms may be too slow for large inputs, affecting scalability and performance.
What is an example of a problem best solved using a heuristic rather than an algorithm?
The Travelling Salesman Problem (TSP)—heuristics like Genetic Algorithms or Simulated Annealing provide fast approximate solutions.