C ++ program to find out maximum value from a given sequence of coins
#include <bits/stdc++.h> NEW_LINE using namespace std ; const int MAX = 100 ; int memo [ MAX ] [ MAX ] ; int oSRec ( int arr [ ] , int i , int j , int sum ) { if ( j == i + 1 ) return max ( arr [ i ] , arr [ j ] ) ; if ( memo [ i ] [ j ] != -1 ) return memo [ i ] [ j ] ;