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

The Importance of Data Quality Management in Data Science

Blog banner

Traditional UNIX Scheduling

Blog banner

OLA

Blog banner

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

Blog banner

File Allocation Methods

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

Security issues

Blog banner

Deadlocks in operating system

Blog banner

Smart Homes | Zigbee Alliance

Blog banner

Place to visit in pune

Blog banner

HR Automation : Need of the hour

Blog banner

BrainGate Technology

Blog banner

Bharat Maps

Blog banner

How to Manage Business Invoices and Payments Easily?

Blog banner

Know your Processors!

Blog banner

Operating Systems Overview

Blog banner

Getting into anime My anime suggestions

Blog banner

Unlocking Success: Mastering Google Ads Strategies

Blog banner

Shoulders

Blog banner

Broken Authentication Attacks

Blog banner

Im Photographer

Blog banner

Modern Operating System - Khush bagaria

Blog banner

Thumb Sucking: When It’s Normal and When It Becomes a Dental Problem

Blog banner

Steganography

Blog banner

Child labour

Blog banner

HACKING MOBILE PLATFORM

Blog banner

THREADS (assignment 1)

Blog banner

Vulnerability Assessment (Vulnerability Analysis)

Blog banner

Phishing

Blog banner

Modern Operating System

Blog banner

5 ways to save money on catering services in Mumbai

Blog banner

Deadlock in operating system

Blog banner

Celebrate Diwali the Delicious Way with Meal Maharaj Catering

Blog banner

How Preschool Annual Day Shapes Confidence, Emotions, and Growth

Blog banner

Penetration Testing

Blog banner

Cloud Computing

Blog banner

What your Favorite colour says about You?

Blog banner

Service Design Principles

Blog banner

Vikrant’s first blog

Blog banner

Pioneer Park Zolfo Springs — A Hidden Gem for Nature Lovers Near Arcadia

Blog banner

GUIDE TO GIS

Blog banner

Threat from Inside: Educating the Employees Against Cyber Threats

Blog banner