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

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

Developments in Modern Operating Systems

Blog banner

A Brief Review on Cyber Forensics and its Analysis Tool

Blog banner

Threads

Blog banner

Threads

Blog banner

Street foods

Blog banner

Why Data Security Is Important

Blog banner

The Peephole

Blog banner

Synchronization

Blog banner

Data Security must be your Priority!

Blog banner

Indian Culture and Tradition

Blog banner

Cyber Bullying - Neeta Vonkamuti

Blog banner

Virtual machine

Blog banner

Improving defences Proxy Device(defense in depth)

Blog banner

10 Amazing facts about Tokyo Ghoul

Blog banner

Memory management and virtual memory

Blog banner

Memory management

Blog banner

WAKE UP ITS FOOD o'CLOCK...!!!!!

Blog banner

Google classroom

Blog banner

The Role of Teachers in Building a Child’s Confidence

Blog banner

Subnet Masking

Blog banner

Dental Problems That Start Small But Should Never Be Ignored

Blog banner

Odoo

Blog banner

STUDY OF SYSTEM HACKING TOOLS

Blog banner

SECURITY TOOLS

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

Are Social Media Paid Campaigns Worth It?

Blog banner

Partnership in Learning: How Parent Involvement Shapes a Child’s Early Education

Blog banner

10 Problems you face if you are an Otaku

Blog banner

Have You Explored India Yet?

Blog banner

Asana

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Kernel Modes: User Mode vs. Kernel Mode - 80

Blog banner

Continual service improvement vs maintenance phase in IT

Blog banner

Virtual Memory

Blog banner

Top 5 Tech Innovations of 2018

Blog banner

Virtual Machine

Blog banner

Exploring Human Factors in Cyber Forensics Investigations.

Blog banner

Service Validation and Testing during the Design Phase

Blog banner

KASHMIR TRIPS

Blog banner

Self defence

Blog banner