TGViewer
Coding Interview Preparation Coding Interview Preparation @coding_interview_preparation · 5.9K subscribers
Post #1346 320
🧠 EDUCATIONAL CS #1 - Big O, Explained Without the Jargon

Big O isn't about "how fast is my code." It's about "how does my code's cost grow as the input grows."

Think of it like this:

📦 O(1) - Grabbing the first item in a box. Doesn't matter if the box has 10 or 10 million items.

📦 O(log n) - Finding a word in a dictionary by flipping to the middle, then the middle of that half, and so on. Doubling the dictionary size only adds one more flip.

📦 O(n) - Reading every page of a book once. Twice the pages, twice the time.

📦 O(n log n) - Sorting a deck of cards efficiently (merge sort). A bit worse than linear, way better than...

📦 O(n²) - Comparing every card in the deck to every other card. Double the deck, quadruple the work.

Here's the part interviewers actually care about: can you identify the complexity of code you didn't write, and can you explain why, not just state the label.

Quick check - what's the time complexity of this?

python
def mystery(arr):
for i in range(len(arr)):
for j in range(i, len(arr)):
print(arr[i], arr[j])


Drop your answer below 👇 (hint: it's not quite O(n²))
More from @coding_interview_preparation
  1. Oct 8, 2026If you're prepping for system design interviews, this repo is gold It contains a curated,…
  2. Oct 6, 2026document post
  3. Oct 4, 2026💼 Why Your Resume Gets Rejected Before a Human Reads It You may have good skills and proj…
  4. Oct 2, 2026🧠 Coding Myths You Should Stop Believing There's a lot of advice online about learning to…
  5. Oct 1, 2026Most Asked Topics in AI Engineer Interviews Based on 2026 candidate reports
  6. Sep 30, 2026💼 What Companies Actually Look For in a Fresher Think companies only care about your CGPA…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →