Determine Whether Queries Can Zero Array | Uber Interview Question