---
title: "Discussion on \"Explaining O(n) and O(1)\" | Hashnode"
description: "Discussion on \"Explaining O(n) and O(1)\". O(n) vs O(1)\nWhen we say an algorithm is O(n), we imply that it takes n steps to take this algorithm from start to finish, given n is the number of input, or in the array case, the length of an array. \nFor example, let's look at the following code sn..."
url: "https://hashnode.com/posts/explaining-on-and-o1/60db518d7c7df7644acdda58"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Explaining O(n) and O(1)](https://cup-of-coding.hashnode.dev/explaining-on-and-o1?utm_source=hashnode&utm_medium=feed)

O(n) vs O(1) When we say an algorithm is O(n), we imply that it takes n steps to take this algorithm from start to finish, given n is the number of input, or in the array case, the length of an array. For example, let's look at the following code sn...

Jun 29, 2021 · 2 min read · cup-of-coding.hashnode.dev  
Read the article

-   [#array](https://hashnode.com/tag/array)
-   [#java](https://hashnode.com/tag/java)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Thi Le](https://hashnode.com/@thi-lee)

@thi-lee

  
[View profile](https://hashnode.com/@thi-lee)

I'm talking data structure and algorithms, for now

## Responses 1

Markdown supported · ⌘↵ to post

[Milo 🏳️‍🌈 🦋 Xeon](https://hashnode.com/@mvoloskov)

[Jul 4, 2021](https://hashnode.com/posts/explaining-on-and-o1/60db518d7c7df7644acdda58/comment/60e22e0a4f8e376422a7ac93)

Wow, nice to see such a topic here! Definitely a must-read!

The key point to understand in the whole big-O thing is that it represents _how the number of operations grows_, not the number of operations itself.
