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

The Future of Patola Weaving in a Sustainable Fashion World

Blog banner

Virtual memory

Blog banner

Types Of scheduling

Blog banner

Explain the concept of ( MIS) Management information systems

Blog banner

Business Intelligence v/s Big Data

Blog banner

Virtual Machine

Blog banner

What Your Child Learns During Free Play (That You Might Not Notice)

Blog banner

note taker app

Blog banner

Raid

Blog banner

Digital marketing spotlight “Dove’s Real Beauty Campaign”

Blog banner

Juveniles, Internet and Computer Crime

Blog banner

Street foods

Blog banner

Types of OS

Blog banner

How Unstructured Play Helps Children Become Creative Thinkers

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner

Electronic Funds Transfer

Blog banner

Impacts of Data Breach On Companies Challenges and Prevention

Blog banner

File management

Blog banner

What is online marketing and why do you need to know about it ?

Blog banner

An Overview of Virtual Machines

Blog banner

Memory management

Blog banner

From Model Mistakes to Metrics

Blog banner

Data Science in Healthcare: Predicting Diseases

Blog banner

'C', 'C++' and 'Java': Head-to-Head

Blog banner

This is my first blog.

Blog banner

Dal Bafla Recipe

Blog banner

Facebook Shut Down an AI Program!!! Facebook AI bots became Terminators???

Blog banner

Cloud Computing

Blog banner

Music

Blog banner

Deadlock in operating system

Blog banner

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

Blog banner

Exploring Virtual Machines and Computer Forensic Validation Tools

Blog banner

Life of an army person

Blog banner

Virtual Machine

Blog banner

Royal enfield

Blog banner

Security in Operating Systems

Blog banner

BENIFITS OF YOGA

Blog banner

What is Vishing?

Blog banner

Security issues

Blog banner

Virtual Memory

Blog banner

Big Data Architecture

Blog banner

Modern OS

Blog banner