Nepal's open education portal

EduNepalEduNepal

Data Structures and Algorithms — Complete Course Notes (BCA 3rd Sem)

Comprehensive lecture notes on asymptotic analysis, stacks, queues, linked lists, trees, graphs, and sorting algorithms for TU BCA.

Data Structures and Algorithms · CACS201 · Semester 3

BCA Curriculum 2079

Unit 2•Unit 2 of 5

Unit 2: 1. Algorithm Analysis & Asymptotic Notations

The efficiency of an algorithm is measured in terms of Time Complexity (CPU execution time) and Space Complexity (memory storage consumed) as a function of input size n.

Asymptotic Notations:

  1. Big O (O): Upper bound. Represents worst-case running time: f(n) ≤ c · g(n) for all n ≥ n0.
  2. Big Omega (Ω): Lower bound. Represents best-case running time: f(n) ≥ c · g(n).
  3. Big Theta (\Theta): Tight bound. Represents average-case when upper and lower bounds coincide.

Related video lessons

View all →

Practice questions

View all →
  • What is the worst-case time complexity of Quick Sort algorithm? (a) O(n) (b) O(n log n) (c) O(n^2) (d) O(log n)objective · 1 marks
  • Differentiate between Linear Queue and Circular Queue. Explain how modulo arithmetic prevents false overflow.short · 5 marks

View all questions for this subject →

← Back to all notes