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

bulk email software

Blog banner

Deadlocks

Blog banner

Getting to Kashmir: Alternative to the Jammu-Srinagar highway

Blog banner

Apple

Blog banner

PHISHING

Blog banner

Life of a 2020-2021 student

Blog banner

What is service level Agreement?

Blog banner

Understanding Regression Analysis

Blog banner

Theads

Blog banner

Threads and concurrency

Blog banner

Cache memory

Blog banner

Answer

Blog banner

ITIL Version 3 and 4 differenciation?

Blog banner

Maharashtrian culture: Tradition, Art, Food

Blog banner

What is semaphore in operating system?

Blog banner

How to Prepare Your Child for Their First Day of School?

Blog banner

ADD A SPICE TO YOUR LIFE.

Blog banner

Decoding the Weave — How to Identify Original Patola Art on a Fabric

Blog banner

5 People who claimed to have Time Traveled

Blog banner

My Favorite Sportsperson

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

Top Career Paths After a B.Com Degree in Mumbai: What’s Next for You?

Blog banner

Components of GIS

Blog banner

Fitness

Blog banner

Scheduling

Blog banner

Uniprocessor scheduling

Blog banner

Memory Partitioning

Blog banner

The most common internet security threats

Blog banner

File Management system

Blog banner

Software Piracy & Online Data Protection in Digital World

Blog banner

MENDELEY

Blog banner

Deadlock and Starvation

Blog banner

How Does SSO Works

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Segmentation and paging concept

Blog banner

LINUX VSERVER VIRTUAL MACHINE ARCHITECTURE

Blog banner

Cyber Security in Data Breaching

Blog banner

IT security management

Blog banner

Principles of Service Operation

Blog banner

Article on different management system

Blog banner

Microsoft powerpoint presentation

Blog banner

Swiggi

Blog banner