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

Paralysis/Paralysis Stroke

Blog banner

Types of OS

Blog banner

Security in Operating Systems

Blog banner

Social Engineering Attacks

Blog banner

Friendship

Blog banner

Note Taker App

Blog banner

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

The Power of Cyber Forensic in Solving Crimes

Blog banner

What is Virtual Memory

Blog banner

38_Exploring The Honeynet Project

Blog banner

The Role of Cyber Forensics in Addressing Cyber security Challenges in Smart Cities

Blog banner

Fault Tolerance

Blog banner

Navigation With Indian Constellation(NavIC) by ISRO in Geographic Information Systems

Blog banner

Digital black market or dark net poses a national security threat?

Blog banner

NETWORK SECURITY RISKS

Blog banner

Operating system and overviews

Blog banner

DURGA POOJA

Blog banner

The Role of Data Provenance and Lineage in Modern Data Science

Blog banner

PYTHON

Blog banner

Video games

Blog banner

Earth with no trees

Blog banner

CONCURRENCY: MUTUAL EXCLUSION AND SYNCHRONIZATION-het karia

Blog banner

A-B-C of Networking: Part-3 (Topology [Bus & Star])

Blog banner

LiquidPlanner

Blog banner

How I use google in my daily life

Blog banner

Benefits and drawback of web security.

Blog banner

MY MOST THRILLED TREK ..... BHAIRAVGAD

Blog banner

Short-Form Video Marketing: Why It's Dominating the Internet

Blog banner

The Right way of cooking

Blog banner

How User Data Shapes Personalised Campaigns

Blog banner

PHONE TECHNOLOGY

Blog banner

How Men and Women Process Pain Differently

Blog banner

Travelling blog

Blog banner

DATA SCIENCE IN BUSINESS AND MARKETING

Blog banner

A Deep Dive

Blog banner

Interesting fact about kangaroo.

Blog banner

USES OF WHATSAPP

Blog banner

Why Consistency in Eating Habits Matters and How Meal Maharaj Makes It Easy

Blog banner

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

Blog banner

Why You Need 2FA (Two-Factor Authentication) On Your Email And Other Online Accounts

Blog banner

Why Users Leave Your Website in 5 Seconds (And How UI/UX Fixes It)

Blog banner

Recipe of Paneer Butter Masala

Blog banner