Driver Code
int main ( ) { char A [ ] = { ' U ' , ' R ' , ' R ' , ' R ' , ' R ' } ; int B [ ] = { 1 , 1 , 1 , 1 , 0 } ; int N = sizeof ( A ) / sizeof ( B [ 0 ] ) ; finalPosition ( A , B , N ) ; return 0 ; }