0% found this document useful (0 votes)
158 views1 page

Coding Solutions for PDF Challenges

This document contains code for a function that takes an integer array, its length, and a target sum as parameters. It aims to find 3 numbers from the array that sum to the target number and outputs those numbers or -1 if no 3 numbers sum to the target.

Uploaded by

Shyam Ji Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views1 page

Coding Solutions for PDF Challenges

This document contains code for a function that takes an integer array, its length, and a target sum as parameters. It aims to find 3 numbers from the array that sum to the target number and outputs those numbers or -1 if no 3 numbers sum to the target.

Uploaded by

Shyam Ji Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

/* Write your code here */

Name : Shyam JI

Ques : 1

int arr[] = {1,5,6,2,4,3}; N =6int k = 9output : 5,3,1 in case : -1


5+3+1=9

void sol(int arr[],int n,int )


{

You might also like