---
title: "Discussion on \"3 Sum - LeetCode\" | Hashnode"
description: "Discussion on \"3 Sum - LeetCode\". The problem is taken from  15. 3Sum.\nNaive Approach\nNaive approach would be to go through all possible triplets in the array. And use set data structure to remove duplicates. \nCode - \nclass Solution {\npublic:\n    vector<vector<int>> threeSum(vector<i..."
url: "https://hashnode.com/posts/3-sum-leetcode/61b44d5ab18f1f0c683008c8"
---

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

Discussion

# [3 Sum - LeetCode](https://suraj26.hashnode.dev/3-sum-leetcode?utm_source=hashnode&utm_medium=feed)

The problem is taken from 15. 3Sum. Naive Approach Naive approach would be to go through all possible triplets in the array. And use set data structure to remove duplicates. Code - class Solution { public: vector<vector<int>> threeSum(vector<i...

Dec 11, 2021 · 2 min read · suraj26.hashnode.dev  
Read the article

-   [#problem-solving-skills](https://hashnode.com/tag/problem-solving-skills)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#array](https://hashnode.com/tag/array)
-   [#technical-interview](https://hashnode.com/tag/technical-interview)

## Written by

[Suraj Yadav](https://hashnode.com/@Suraj26)

@Suraj26

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

Crawling in the world of Computer Science.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
