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

Explain Multiprocessors

Blog banner

Puri Jagannath temple

Blog banner

Indian Culture and Tradition

Blog banner

Memory Management

Blog banner

Mendeley (management software)

Blog banner

Modern operating system

Blog banner

Cyber Forensic in the Banking sector

Blog banner

Importance of Website

Blog banner

LiquidPlanner

Blog banner

Title: Network Sniffing Techniques: Uncovering the Secrets of Data Transfer

Blog banner

MIDDLE CLASS MELODIES!!

Blog banner

Data Visualization – Importance and tools (Tableau, Power BI)

Blog banner

Threat management

Blog banner

Types of Threads

Blog banner

Understanding Regression Analysis

Blog banner

How social media affect

Blog banner

Human Error: The weakest link in Cybersecurity

Blog banner

The launch of UniMap by HERE

Blog banner

What is thread and multithreading ?

Blog banner

Modern Operating System

Blog banner

Discover The Top 3 Places To Stay in London

Blog banner

AI and cyber Security

Blog banner

Building a Better You: Fitness Tips and Inspiration.

Blog banner

Threads

Blog banner

The IT Service Lifecycle

Blog banner

10 Types of Friends in every friend group

Blog banner

EVOLUTION OF THE MIRCOPROCESSOR

Blog banner

How to kiss

Blog banner

Privacy LAWs in IT

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

10 Reasons to date your best friend

Blog banner

Be you

Blog banner

LEMON PICKLE (NIMBU KA ACHAR)

Blog banner

Top 4 Places To Stay In Copenhagen

Blog banner

How Cyber Forensics use in AI

Blog banner

The Art Of Getting What You Want In Life....

Blog banner

The application udemy

Blog banner

Memory hierarchy

Blog banner

MODERN OPERATING SYSTEM

Blog banner

SQL Injection

Blog banner

DMZ: Your Secret Weapon for Data Security

Blog banner

Is Brushing After Eating Damaging Your Teeth? (Fact or Myth)

Blog banner