---
title: "Discussion on \"1. Two Sum - Leetcode - JavaScript Solution using HashMap - by Abu Saleh Faysal\" | Hashnode"
description: "Discussion on \"1. Two Sum - Leetcode - JavaScript Solution using HashMap - by Abu Saleh Faysal\". I previously solved this problem using two for loops. However, that was not a very efficient way to solve this problem. So, this time I solved this problem using HashMap.\nSolution:\nStep 01: Hashmap is a set of key, value pairs. I declared a variable ..."
url: "https://hashnode.com/posts/1-two-sum-leetcode-javascript-solution-using-hashmap-by-abu-saleh-faysal/636fb49cba12f9110e26062f"
---

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

Discussion

# [1\. Two Sum - Leetcode - JavaScript Solution using HashMap - by Abu Saleh Faysal](https://abusalehfaysal.hashnode.dev/1-two-sum-leetcode-javascript-solution-using-hashmap-by-abu-saleh-faysal?utm_source=hashnode&utm_medium=feed)

I previously solved this problem using two for loops. However, that was not a very efficient way to solve this problem. So, this time I solved this problem using HashMap. Solution: Step 01: Hashmap is a set of key, value pairs. I declared a variable ...

Nov 12, 2022 · 2 min read · abusalehfaysal.hashnode.dev  
Updated Nov 13, 2022  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#problem-solving](https://hashnode.com/tag/problem-solving)
-   [#leetcodedaily](https://hashnode.com/tag/leetcodedaily)

## Written by

[Abu Saleh Faysal](https://hashnode.com/@AbuSalehFaysal)

@AbuSalehFaysal · Dhaka, Bangladesh

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

Software Engineer | Front-End Developer | JavaScript | TypeScript | React | Redux

Experienced software engineer with a demonstrated history of working in several tech startups. Skilled in Front-End Development using Bootstrap, TailwindCSS, JavaScript, TypeScript, React, Redux, Firebase. Strong software professional with a Bachelor of Science focused in Computer Science and Engineering from BRAC University.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
