---
title: "Discussion on \"Understanding Leetcode Problem: 2Sum\" | Hashnode"
description: "Discussion on \"Understanding Leetcode Problem: 2Sum\". When it comes to tackling any problem, the brute force approach is like taking the direct path. It might not be the most efficient, but it certainly gets the job done. Let's delve into how this approach works and how to approach it step by step.\nIter..."
url: "https://hashnode.com/posts/understanding-leetcode-problem-2sum/64dcf3992d1f9faa67129a99"
---

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

Discussion

# [Understanding Leetcode Problem: 2Sum](https://monishobaid.hashnode.dev/understanding-leetcode-problem-2sum?utm_source=hashnode&utm_medium=feed)

When it comes to tackling any problem, the brute force approach is like taking the direct path. It might not be the most efficient, but it certainly gets the job done. Let's delve into how this approach works and how to approach it step by step. Iter...

Aug 16, 2023 · 6 min read · monishobaid.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#python](https://hashnode.com/tag/python)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Monish Obaid](https://hashnode.com/@monishobaid)

@monishobaid · New Delhi, India

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

final-year computer science student with a passion for problem-solving and innovation, that has a positive impact on the world.

## Responses 1

Markdown supported · ⌘↵ to post

[Avdhesh Varshney](https://hashnode.com/@avdhesh-varshney)

[Aug 16, 2023](https://hashnode.com/posts/understanding-leetcode-problem-2sum/64dcf3992d1f9faa67129a99/comment/64dd11824429385b92804b98)

Expected output - \[0, 3\]

[Monish Obaid](https://hashnode.com/@monishobaid)

[Aug 16, 2023](https://hashnode.com/posts/understanding-leetcode-problem-2sum/64dcf3992d1f9faa67129a99/comment/64dd11824429385b92804b98#reply-64dd25574429385b92804df3)

Thanks for correcting
