Disclaimer: This is not a class project, more of work related. I tried finding example online but generally its just for transversing through the tree. I am coding it in C#
Hi all,
I am trying to use DFS to calculate the biggest possible number sum combination which will be equal to the number given with some other conditions.
- Total sum of weight needs to be below 150 in a class.
- Total height in the class cannot be more than 600.
- Max number of student if possible in Class A
- If same height and weight, the person with the smaller ID will be considered first.
ID - Weight - Height
1 - 80 - 150
2 - 30 - 100
3 - 30 - 150
4 - 50 - 100
5 - 60 - 150
6 - 40 - 100
Class 1: 1, 2, 6
Class 2: 3, 4, 5
Class 3:
Anyone can point me in the right direction or DFS shouldn't be used in this case?