EmperMiner
❔ C# Recursion Output problem
Here's a piece of code (formatted by benqbenq) in C# for finding the sum of triplets that are closest to 1. The code outputs the sum, but I want it to output the triplets that produced the sum. I'm a noob at C# and recursion is difficult, can anyone help?
5 replies
❔ Can anyone explain this piece of code
So I found a piece of code online that solves my problem, but I have to understand how it works before being able to modify it to fit my needs. Can anyone tell me what the FindCloseTriplet() function is actually doing? I found it confusing to read.
https://www.geeksforgeeks.org/find-a-triplet-in-an-array-whose-sum-is-closest-to-a-given-number/amp/?fbclid=IwAR30br4s6ta3oq9O1IwhSWCD6E25hzk1ulSUPfiAjQcSQvyIuJcXXlN2C10
9 replies