Recursive function to find the maximum absolute displacement from origin by performing the given set of moves
static int DistRecursion ( String S , int i , int dist ) { char [ ] ch = S . toCharArray ( ) ;