Guest User

Untitled

a guest
Mar 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. int backtracking(int res, int i){
  2. if(i >= v.size()){
  3. if(res <= n) {
  4. return res;
  5. } else{
  6. return INT_MIN;
  7. }
  8. }
  9. return max(backtracking(res+v[i], i+1),
  10. backtracking(res, i+1));
  11. }
Add Comment
Please, Sign In to add comment