April Long challenge 2020 -COVIDLQ

april long 2020
problem 1: COVID Pandemic and Long Queue

solution:
O(1) time complexity 0 ms runtime
check for ‘1’ and find difference between index of two contiguous ‘1’ and if it is lesser than 6…then cout “no” else “yes”

explanation

1 Like