This function mainly calls recursive function distSumRec ( ) to generate distinct sum subsets . And finally prints the generated subsets .
static void printDistSum ( int [ ] arr , int n ) { HashSet < int > s = new HashSet < int > ( ) ; distSumRec ( arr , n , 0 , 0 , s ) ;