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

SECURITY RISKS OF REMOTE WORKING

Blog banner

Memory Management

Blog banner

Vulnerability Assessment

Blog banner

Buffers in Operating Systems

Blog banner

Decoding Confusion Matrix

Blog banner

memory management

Blog banner

An Overview of Virtual Machines

Blog banner

10 Reasons to date your best friend

Blog banner

VIRTUAL MACHINE

Blog banner

The Future of Cybersecurity: Trends, Challenges, and Strategies

Blog banner

Why we should do reading

Blog banner

Why is ITSM important in IT organization?

Blog banner

Review on Cyber Forensics and its Analysis Tools

Blog banner

RSA (Rivest-Shamir-Adelman) Algorithm

Blog banner

Points to consider if you're planning to visit Florida in 2026

Blog banner

Admissions Open: Why This Is the Right Time to Choose the Best School for Your Child

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

The Future of Web Development in 2026: Trends Every Business Must Know

Blog banner

What is Brute Force Attack? How to defend against it?

Blog banner

Ghee vs. Coconut Oil vs. Mustard Oil: Which Cooking Fat Wins for Indian Food?

Blog banner

Deadlock and Starvation

Blog banner

Modern operating system

Blog banner

Emotional Suppression: The Hidden Costs Of Unfelt Feelings

Blog banner

How India made the GIS its Own, and its Use in Infrastructural Developments

Blog banner

RAID

Blog banner

Footprinting

Blog banner

OS PROCESS DESCRIPTION AND CONTROL-SARVAGYA JALAN

Blog banner

GUIDE TO GIS

Blog banner

Data is an asset and it is your responsibility!

Blog banner

Deming’s Process

Blog banner

It's all about our Brain.- The Brain Metaphor

Blog banner

Sniffing: A Cyber Security Threat

Blog banner

What is 'Multi-core and Multi-threading' ?

Blog banner

Assignment 2

Blog banner

Privacy in Social Media and Online Services

Blog banner

Principles of Concurrency

Blog banner

INTERRUPTS

Blog banner

Security Breaches in Stock market trading

Blog banner

objectives and function of operating system

Blog banner

"Games and the future"

Blog banner

Stay Close To Adventure In Arcadia, Florida At Oak Tree Hotel

Blog banner

Mumbaicha Dabbawalla

Blog banner