wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Big O Notation

profile
Ronak Gala
Feb 16, 2023
2 Likes
2 Discussions
167 Reads

 Big-O Analysis of Algorithms

We can express algorithmic complexity using the big-O notation. For a problem of size N:

  • A constant-time function/method is “order 1” : O(1)
  • A linear-time function/method is “order N” : O(N)
  • A quadratic-time function/method is “order N squared” : O(N2 )

Definition: Let g and f be functions from the set of natural numbers to itself. The function f is said to be O(g) (read big-oh of g), if there is a constant c > 0 and a natural number n0 such that f(n) ≤ cg(n) for all n ≥ n0 .

Note: O(g) is a set!

 

 

Runtime Analysis of Algorithms

In general cases, we mainly used to measure and compare the worst-case theoretical running time complexities of algorithms for the performance analysis. 
The fastest possible running time for any algorithm is O(1), commonly referred to as Constant Running Time. In this case, the algorithm always takes the same amount of time to execute, regardless of the input size. This is the ideal runtime for an algorithm, but it’s rarely achievable. 
In actual cases, the performance (Runtime) of an algorithm depends on n, that is the size of the input or the number of operations is required for each input item. 


Comments ()


Sign in

Read Next

Exploring Human Factors in Cyber Forensics Investigations.

Blog banner

File system

Blog banner

Skills An Ethical Hacker Must Have

Blog banner

evolution of operating system - Disha Parekh

Blog banner

OPERATING SYSTEM

Blog banner

Components of GIS

Blog banner

ZOHO

Blog banner

INTERNET SECURITY

Blog banner

Emotional Intelligence in Children: Why It Is as Important as Academics

Blog banner

Software

Blog banner

Digital Marketing - The new way to reach end consumer

Blog banner

Operating system

Blog banner

Evolution of Operating Sytems

Blog banner

Save Girl Child

Blog banner

What are NFT s?

Blog banner

Having passion in life

Blog banner

OPERATING SYSTEM

Blog banner

Article on Fresh Book

Blog banner

Processing Crime and Incident Scenes

Blog banner

Save Environment

Blog banner

Smartphone Security: Vulnerabilities and Attacks

Blog banner

Therapy Myths That Need to End in 2025

Blog banner

Famous Indian dishes that where misunderstood to be Indian

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

Environmental Management using GIS

Blog banner

Go Daddy

Blog banner

When Is the Right Time to Enrol My Toddler Into Preschool? NEP

Blog banner

Linux 94

Blog banner

Importance of modern technology era

Blog banner

Paginng In OS

Blog banner

NETSUITE

Blog banner

Memory Management - operating system

Blog banner

Artificial Intelligence (AI)

Blog banner

Expressing and Measuring Risk (Risk Management)

Blog banner

PPT methodology

Blog banner

URL vs Domain

Blog banner

Mumbai Metro 3

Blog banner

HR Automation : Need of the hour

Blog banner

Technical Challenges and Directions for Digital Forensics

Blog banner

Docker Framework

Blog banner

Geographic Information Systems(By aditi Unnikrishnan)

Blog banner

Secure Hypertext transfer protocol

Blog banner