I have applied bruth force approach in this question.This code is successfully running in my ide but showing error in coding blocks ide.This is the link of my code https://ide.codingblocks.com/s/81380
Array Target sum pir problem
Hi @anikcode, pls see that your code is giving wrong answer for the following testcase:
// Input
5 5
1 2 3 4 5// Your Output
1 and 4// Expected Output
1 and 4
2 and 3
Try some another approach.