wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Big O Notation

profile
Ronak Gala
Feb 16, 2023
2 Likes
2 Discussions
170 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

Modern Operating System

Blog banner

NETWORK SECURITY RISKS

Blog banner

What does the Australian summer have in store for your oral health?

Blog banner

?Your Guide to Great Flossing, by the best affordable dentist in Maroubra

Blog banner

The Right way of cooking

Blog banner

Mumbai

Blog banner

Exploring the Power of Encase Forensic Tools: Unraveling Digital Mysteries

Blog banner

Art and Culture of Rajasthan

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

virtual machine

Blog banner

Excel records

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner

I Personally

Blog banner

Pandas Matrix Applications

Blog banner

How To Setup DVWA Using XAMPP on Windows

Blog banner

Theads

Blog banner

Digital marketing spotlight “Dove’s Real Beauty Campaign”

Blog banner

Random Forests

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

Title: Modern Operating Systems: Powering the Digital Era

Blog banner

10 Interesting facts you should know!!!

Blog banner

DIGITAL ECONOMY

Blog banner

Privacy LAWs in IT

Blog banner

Memory management

Blog banner

Digital Footprints An Emerging Dimension of Digital Inequality

Blog banner

Zoho

Blog banner

Process in OS

Blog banner

Internet of Things and cyber security

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

Reconnaissance

Blog banner

Impact of social media on the human life

Blog banner

Modern Operating System

Blog banner

Online Education

Blog banner

How to Run your First android App

Blog banner

Does School Infrastructure Really Matter For Learning?

Blog banner

RAID

Blog banner

Mumbai famous street food

Blog banner

Blockchain Transactions

Blog banner

A Weekend at Oak Tree Hotel: The Best Hotel Experience in Arcadia, Florida

Blog banner

ProofHub

Blog banner

JIRA SOFTWARE

Blog banner

Race Condition in Operating Theatre

Blog banner