---
title: "Discussion on \"3Sum Closest - Step-by-Step with Java\" | Hashnode"
description: "Discussion on \"3Sum Closest - Step-by-Step with Java\". Problem Statement\nThe problem asks us to find three numbers in an array whose sum is closest to a given target value.\nExample Input: nums = [-1, 2, 1, -4], **target = 1 **Expected Output**:2`\n\nApproach\nWe can solve the problem using the Two Pointer T..."
url: "https://hashnode.com/posts/3sum-closest-step-by-step-with-java/67645ea2d15c46bd6b36470d"
---

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

Discussion

# [3Sum Closest - Step-by-Step with Java](https://kumarpallav.dev/3sum-closest-step-by-step-with-java?utm_source=hashnode&utm_medium=feed)

Problem Statement The problem asks us to find three numbers in an array whose sum is closest to a given target value. Example Input: nums = \[-1, 2, 1, -4\], \*\*target = 1 \*\*Expected Output\*\*:2\` Approach We can solve the problem using the Two Pointer T...

Dec 19, 2024 · 4 min read · kumarpallav.dev  
Read the article

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

## Written by

[Kumar Pallav](https://hashnode.com/@Codingsaint)

@Codingsaint · Bangalore , India

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

Simple Short Tutorials

I am a developer who loves Java, Spring, Quarkus, Micronaut, Open source, Microservices, Cloud

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
