---
title: "Discussion on \"Why O(n) Was Slower Than O(n log n) -  And It Broke Everything I Thought I Knew About Time Complexity\" | Hashnode"
description: "Discussion on \"Why O(n) Was Slower Than O(n log n) -  And It Broke Everything I Thought I Knew About Time Complexity\". so today i encountered a pretty standard DSA question - find the common elements between two arrays."
url: "https://hashnode.com/posts/why-o-n-was-slower-than-o-n-log-n-and-it-broke-everything-i-thought-i-knew-about-time-complexity/69bd6307475ca179740745ca"
---

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

Discussion

# [Why O(n) Was Slower Than O(n log n) - And It Broke Everything I Thought I Knew About Time Complexity](https://ashok-gupta.hashnode.dev/why-o-n-was-slower-than-o-n-log-n-and-it-broke-everything-i-thought-i-knew-about-time-complexity?utm_source=hashnode&utm_medium=feed)

so today i encountered a pretty standard DSA question - find the common elements between two arrays.

Mar 20 · 8 min read · ashok-gupta.hashnode.dev  
Read the article

-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#time-complexity](https://hashnode.com/tag/time-complexity)
-   [#optimization](https://hashnode.com/tag/optimization)
-   [#technology](https://hashnode.com/tag/technology)
-   [#techblog](https://hashnode.com/tag/techblog)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#java](https://hashnode.com/tag/java)
-   [#cpu](https://hashnode.com/tag/cpu)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#performance](https://hashnode.com/tag/performance)
-   [#performance-optimization](https://hashnode.com/tag/performance-optimization)

## Written by

[Ashok kumar](https://hashnode.com/@ashok01)

@ashok01 · India

  
[View profile](https://hashnode.com/@ashok01)

Developer

software dev who actually enjoys debugging (weird, i know) i spend most of my time fixing broken code , Building new things and honestly? i love it. there's something about hunting down bugs that just hits different. when i'm not staring at terminal logs, i'm either at the gym or checking out new places. currently exploring different areas in tech and building stuff in public because why not share the messy journey. india 🇮🇳

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
