Failing for larger test cases solved


In case you get failing for larger test case error,
try using 2^62 as INT_MAX instead of 2^31.
This worked for me


Try to print solutions using an additional 2d array to keep track of elements and backtracking it.
This worked for me earlier I was using an iterative way to print elements which lead to failing for larger test cases.