Now one test case is not passing help me with the test case
Here is my Code of the function-
"public static int count(int arr[],int si,int ei,int p){
if(si>=ei){
return 0;
}
if(p==1){
int f=arr[si]+count(arr,si+1,ei,0);
int s=arr[ei]+count(arr,si,ei-1,0);
return Math.max(f,s);
}else{
if(arr[si]>arr[ei]){
return count(arr,si+1,ei,1);
}else{
return count(arr,si,ei-1,1);
}
}
}"