2 min read

Data Structures - Asymptotic Analysis

The main idea of asymptotic analysis is to have a measure of the efficiency of algorithms that doesn’t depend on machine-specific constants and doesn’t require algorithms to be implemented and time taken by programs to be compared.
Data Structures - Asymptotic Analysis

Asymptotic analysis of an algorithm refers to defining the mathematical framing of its run-time performance. Using asymptotic analysis, we can very well conclude the best case, average case, and worst case scenario of an algorithm.

Asymptotic notations are mathematical tools to represent the time complexity of algorithms for asymptotic analysis.

Usually, the time required by an algorithm falls under three types −

  • Best Case − Minimum time required for program execution.
  • Average Case − Average time required for program execution.
  • Worst Case − Maximum time required for program execution.

Asymptotic Notations

Following are the commonly used asymptotic notations to calculate the running time complexity of an algorithm.

  • Ο Notation
  • Ω Notation
  • θ Notation

Big Oh Notation, Ο

The notation Ο(n) is the formal way to express the upper bound of an algorithm's running time. It measures the worst case time complexity or the longest amount of time an algorithm can possibly take to complete.

Big O Notation

For example, consider the case of Insertion Sort. It takes linear time in best case and quadratic time in worst case. We can safely say that the time complexity of Insertion sort is O(n^2). Note that O(n^2) also covers linear time.

continue reading...

Data Structures - Asymptotic Analysis - Tutorialspoint
Data Structures - Asymptotic Analysis - Asymptotic analysis of an algorithm refers to defining the mathematical boundation/framing of its run-time performance. Using asymptotic analysis, we can very w
https://www.tutorialspoint.com/data_structures_algorithms/asymptotic_analysis.htm

#Algorithms #Analysis #Complexity #AsymptoticNotations #Probyto #ProbytoAI

Subscribe and follow us for latest news in Data Science and Machine learning and stay updated!
Facebook: https://facebook.com/probyto
Twitter: https://twitter.com/probyto
LinkedIn: https://linkedin.com/company/probyto
Instagram: https://instagram.com/probyto