I don’t know whats wrong in my code here it is

#include <bits/stdc++.h>

using namespace std;

int frogTPD(int n,vectorarr,int i){

if(i >= n) return 0;

int op1 = arr[i]-arr[i+1] + frogTPD(n,arr,i+1);

int op2 = arr[i]-arr[i+2] + frogTPD(n,arr,i+1);

```
return abs(min(op1,op2));
```

}

int main()

{

int n;

cin >> n;

vectorarr(n);

for(int i=0;i<n;i++){

cin >> arr[i];

}

cout<<frogTPD(n,arr,0);

```
return 0;
```

}