Comment Comment by devmop It takes the same (huge) amount of time for all inputs - there's no early exit it always scans to INT_MAX. Hence O(1) parent devmop 4 years ago