---
title: "Discussion on \"Two Sum (Leetcode #1)\" | Hashnode"
description: "Discussion on \"Two Sum (Leetcode #1)\". Question:\nGiven an array of integers nums and an integer target, return the indices of the two numbers such that they add up to the target.\nConstraints:\n\nEach input would have exactly one solution.\n\nThe same element cannot be used twice.\n\n\nExamples:\n..."
url: "https://hashnode.com/posts/two-sum-leetcode-1/666a9c452b87c5f70427ae2b"
---

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

Discussion

# [Two Sum (Leetcode #1)](https://earthcode.hashnode.dev/two-sum-leetcode-1?utm_source=hashnode&utm_medium=feed)

Question: Given an array of integers nums and an integer target, return the indices of the two numbers such that they add up to the target. Constraints: Each input would have exactly one solution. The same element cannot be used twice. Examples: ...

Jun 13, 2024 · 2 min read · earthcode.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#python](https://hashnode.com/tag/python)
-   [#python-for-beginner](https://hashnode.com/tag/python-for-beginner)
-   [#hashmap](https://hashnode.com/tag/hashmap)

## Written by

[Nawat Sunthornyanakit](https://hashnode.com/@Earthsun)

@Earthsun

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

I am a beginner coder who wants to keep track of my coding progress. I will post my LeetCode solutions here. Please feel free to give me advice or suggestions on my code. Also, in the future, I will be posing my data science-related project here as well

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
