wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Big O Notation

profile
Ronak Gala
Feb 16, 2023
1 Like
2 Discussions
166 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

KAHAWA TEA

Blog banner

Security Breaches in Stock market trading

Blog banner

GIS in Disaster Management

Blog banner

File Management In OS

Blog banner

Electronic Evidence in Cyber Forensics

Blog banner

Article on Zoho Corporation

Blog banner

How Men and Women Process Pain Differently

Blog banner

Concurrency and memory

Blog banner

Malicious softwares

Blog banner

Embaded operating system

Blog banner

Cyber Security in Data Breaching

Blog banner

Fitness

Blog banner

The Five Steps of Data Science

Blog banner

MoSCoW METHOD IN DATA SCIENCE

Blog banner

Love is in air.....

Blog banner

AIS & ANN based Malware detection for Android OS - Nupur Bhatt

Blog banner

Friendship

Blog banner

Supervised and unsupervised learning

Blog banner

Security Threats Faced and Countermeasures adopted by Organizations to avoid them

Blog banner

ADIDAS

Blog banner

Service tax applied on sanitary pads and not condoms

Blog banner

BASICS OF SHARE MARKET

Blog banner

Note Taker App

Blog banner

What your Favorite colour says about You?

Blog banner

Revolutionary AI Tool: ChatGPT

Blog banner

Functions of operating system

Blog banner

Deadlock and Starvation

Blog banner

Cache memory

Blog banner

Risk management in IT

Blog banner

TEAMWORK

Blog banner

Im Photographer

Blog banner

BrainGate Technology

Blog banner

Spotify

Blog banner

How To Setup DVWA Using XAMPP on Windows

Blog banner

Different Types of Data

Blog banner

Elegant fashion style

Blog banner

The Evolution of Operating Systems

Blog banner

The Right way of cooking

Blog banner

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

Blog banner

Wiretapping

Blog banner

Soak knowledge and level up your intellectual potential!!!

Blog banner

Memory Management

Blog banner