wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Big O Notation

profile
Ronak Gala
Feb 16, 2023
2 Likes
2 Discussions
171 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

Technical Challenges and Directions for Digital Forensics

Blog banner

Fitness

Blog banner

INTRODUCTION TO C#

Blog banner

DURGA POOJA

Blog banner

Operating system

Blog banner

Technological Advancement

Blog banner

Cloud Forensic Tools And Storage :A Review Paper

Blog banner

Process, process creation and process termination

Blog banner

Principal of concurrency

Blog banner

INTRODUCTION

Blog banner

My Favorite Country

Blog banner

Social Media Sentiment Analysis

Blog banner

How to grow followers on Instagram business account?

Blog banner

memory managment

Blog banner

Malicious softwares

Blog banner

Indian Culture and Tradition

Blog banner

Mumbaicha Dabbawalla

Blog banner

E-BUSINESS RISK MANAGEMENT

Blog banner

File Systems in OS.

Blog banner

INTERNET

Blog banner

Mental Health at Midlife: When Life Transitions Become Emotional Turning Points

Blog banner

Rules and Regulations of Networking: "Standards and Protocols" - Part 2

Blog banner

15 Interesting Facts about India

Blog banner

Drawing tips for a beginner

Blog banner

Women Empowerment

Blog banner

Traveling

Blog banner

History of ITIL

Blog banner

Vulnerability Assessment

Blog banner

Install Ubuntu Easily

Blog banner

How Seasons affect online sales and how to overcome them

Blog banner

What is Minting & Mining

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Self managing devices

Blog banner

A Weekend at Oak Tree Hotel: The Best Hotel Experience in Arcadia, Florida

Blog banner

Apache Kafka

Blog banner

How to lose belly fat

Blog banner

A buffer overflow

Blog banner

Security in Cloud Computing

Blog banner

Why is it hard to design an Operating Systems ?

Blog banner

Computer security techniques

Blog banner

S-Tool : Steganography

Blog banner

Why Seasonal Summer Foods Are Best for Your Health?

Blog banner