A generalized debounce/search problem