← Swiggy questions

Search in an infinite sorted integer stream

Filed under Swiggy

A sorted (ascending) stream of integers has unknown, effectively infinite length and can only be read by index through a function reader(i). Write search(reader, target) that returns the index of…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.