i am able to print yes or no for each pair how to to it so that yes or no only gets printed once
Need help in solving
hello @kartik-malik
declare a global boolean variable and initialise it with false.
if u find my subset with sum equal to target them make this variable true.
and then after this function call
check if variable value is true or false and then print yes no accordingly
1 Like
