Question: Natwest, Recent Online Assessment Questions(11th August 2023) | Cab Service | Pizza Shop | E-Commerce Company
1
Entering edit mode

ADD COMMENTlink 14 months ago PoGo 2.4k
0
Entering edit mode

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 ????

 

ADD COMMENTlink 14 months ago Ayush Agarwal • 20
0
Entering edit mode

1) if dist[i]>low and dist[i]<high append dist[i] to answer vector 
Is it fine or did I misunderstand the question ?? 

ADD COMMENTlink 14 months ago Ayush Agarwal • 20

Login before adding your answer.

Similar Posts
Loading Similar Posts