
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

APPLIED COMPUTING • CHAPTER 3
Computational Thinking, Complexity, and Core Paradigms
Decomposition: Breaking complex problems into smaller, independent sub-routines. Pattern Recognition: Identifying recurring structures (e.g., sliding window, two-pointer, divide-and-conquer). Abstraction: Hiding low-level implementation details behind clean interfaces and data structures. Pseudocode Drafting: Expressing control flow (loops, conditionals, recursion) before writing language-specific syntax.
O(1) Constant: Execution time stays fixed regardless of input size (e.g., hash table lookup). O(log n) Logarithmic: Problem space halves each step (e.g., binary search on sorted arrays). O(n) Linear: Runtime grows proportionally with input size (e.g., single-pass array scan). O(n log n) Linearithmic: Typical efficiency bound for comparison-based sorting (e.g., Merge Sort). O(n²) Quadratic: Nested iterations over input pairs; becomes slow on large datasets. GROWTH RATE COMPARISON (FASTEST TO SLOWEST) O(1) < O(log n) < O(n) < O(n log n) < O(n²) < O(2ⁿ)
Arrays / Lists: Fast O(1) index access; costly O(n) insertions in the middle. Hash Maps / Dictionaries: Average O(1) key-value lookup; unordered unless explicitly maintained. Stacks (LIFO) & Queues (FIFO): Essential for undo histories, depth-first search (DFS), and breadth-first search (BFS). Trees & Graphs: Model hierarchical folders, routing networks, and dependency chains. Original Study Notes • Ready for Upload
Page 1 of 1