DSA_Worksheet icon indicating copy to clipboard operation
DSA_Worksheet copied to clipboard

Triplet Sum in Array

Open DebidYadav opened this issue 2 years ago • 4 comments

Write Code in Only One Language (CPP, C, Java, Python)

Give File Name : triplet_sum ✅ In respective language folder

📑 DESCRIPTION

Triplet Sum in Array

Difficulty

Problem Statement: Given an array arr of size n and an integer X. Find if there's a triplet in the array which sums up to the given integer X.

Input Format:

An integer n which is size of the array and a space separated number x as the sum.
An array of size n.

Output Format:

An integer 1 or true and 0 for false.

Sample Input 1

n = 5, X = 10
arr[] = [1 2 4 3 6]

Sample Output 1

1

Sample Input 2

n = 6, X = 13
arr[] = [1 4 45 6 10 8]

Sample Output 2

1

Constraints

1 ≤ n ≤ 103
1 ≤ A[i] ≤ 105

https://practice.geeksforgeeks.org/problems/triplet-sum-in-array-1587115621/1

DebidYadav avatar Oct 21 '23 19:10 DebidYadav

Please assign it to me.

DebidYadav avatar Oct 21 '23 19:10 DebidYadav

I would like to complete this. Can this be assigned to me?

akshathmangudi avatar Oct 21 '23 19:10 akshathmangudi

@Chitresh-code, I've created a PR. Please review it and mark it under 'hacktoberfest-accepted'

akshathmangudi avatar Oct 23 '23 11:10 akshathmangudi

hey @Chitresh-code can you assign this to me , I like to code in python

yashashwini16 avatar Oct 24 '23 14:10 yashashwini16