wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Big O Notation

profile
Ronak Gala
Feb 16, 2023
1 Like
2 Discussions
169 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

Processing Crime and Incident Scenes

Blog banner

Rain bow

Blog banner

Virtual memory

Blog banner

What is OS and its overview

Blog banner

OS assignment 3

Blog banner

Security Issues and Countermeasures

Blog banner

Dudhasagar waterfall ?

Blog banner

Microsoft Word

Blog banner

Stop Racism

Blog banner

Deadlock and starvation

Blog banner

LinkedIn

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

computer security

Blog banner

Computer Security

Blog banner

Kernel Modes: User Mode vs. Kernel Mode - 80

Blog banner

The Psychology of Diversity, Equity & Inclusion: How Inclusive Workplaces Boost Productivity

Blog banner

Virtual Memory - Explaination, Working, Steps

Blog banner

INTRANET

Blog banner

Open Source Project By Google

Blog banner

Article on Team Work

Blog banner

Consumer to consumer Business model

Blog banner

Why You Should Not Use Free VPNs

Blog banner

Threat management

Blog banner

Principles of Concurrency

Blog banner

QUANTUM COMPUTING IN SECURITY:A GAME CHANGER IN DIGITAL WORLD

Blog banner

Understanding Univariate, Bivariate, and Multivariate Analysis in Data Science

Blog banner

Fashion marketing in india

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Types of Threads

Blog banner

Uniprocessor Scheduling

Blog banner

Characteristics of Etherum

Blog banner

INTERNET

Blog banner

ZOHO

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

How GIS in Agriculture Eliminates Guesswork

Blog banner

Memory management

Blog banner

Clarizen

Blog banner

A Brief Review on Cyber Forensics and its Analysis Tool

Blog banner

Virtual memory

Blog banner

Power of words

Blog banner

All you need to know about Website Traffic

Blog banner

Understanding Mobile Device Forensics

Blog banner