Ayush Vatsa29w
Please check my code....i am getting WA for few test cases
#include<bits stdc++.h="">
using namespace std;
int n,k;
vector<int> a;
int dp[1000002][2];
int f(int pos, int dir){
if(pos>=n || pos<0)
return -1000000006;
if(pos==0)
return a[pos];
if(dp[pos][dir] !=-1000000006)
return dp[pos][dir];
Read more… (111 words)