---
title: "Discussion on \"Why 100 lines of Code can be better than 2 lines of code...\" | Hashnode"
description: "Discussion on \"Why 100 lines of Code can be better than 2 lines of code...\". Does code length matters?"
url: "https://hashnode.com/posts/why-100-lines-of-code-can-be-better-than-2-lines-of-code/6815be425b6714a258e60e6b"
---

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

Discussion

# [Why 100 lines of Code can be better than 2 lines of code...](https://codegyan.hashnode.dev/why-100-lines-of-code-can-be-better-than-2-lines-of-code?utm_source=hashnode&utm_medium=feed)

Does code length matters?

May 3, 2025 · 2 min read · codegyan.hashnode.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Abhinav Kumar](https://hashnode.com/@ashtavakra)

@ashtavakra

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

OnlyCodeGyan

## Responses 1

Markdown supported · ⌘↵ to post

[GirdhaR](https://hashnode.com/@girdhar)

[May 3, 2025](https://hashnode.com/posts/why-100-lines-of-code-can-be-better-than-2-lines-of-code/6815be425b6714a258e60e6b/comment/6815c868e0defe9434067548)

in the worst case it would be 4 comparisons. in your example if the heaviest ball is either among ball 1,2,4 or 5 then it would take 4 comparisons to find that ball
