Computer Science Lecture: Introduction to Algorithms
Introduction to Algorithms
An algorithm is a step-by-step procedure for solving a problem or performing a task. Algorithms are
fundamental in computer science for programming and problem-solving.
Algorithm Complexity
Algorithm complexity is measured in terms of time and space. Time complexity indicates how the
runtime of an algorithm grows with input size, often expressed in Big O notation.
Sorting Algorithms
Common sorting algorithms include Bubble Sort, Merge Sort, and Quick Sort. Each has different
efficiency and use cases. Merge Sort uses divide-and-conquer to sort efficiently in O(n log n) time.
Data Structures
Data structures like arrays, linked lists, stacks, queues, trees, and graphs organize data for efficient
access and modification.