2) Sliding windows
int first_neg_index;
start the sliding windows first_neg only moves if it touches the left side of sliding windows if first_neg is more than the right index of sliding window then return 0 is this approach correct ????
1) if dist[i]>low and dist[i]<high append dist[i] to answer vector Is it fine or did I misunderstand the question ??
Login before adding your answer.