← Infosys questions
CodingMedium-HardReported in a candidate post, Aug 2024

Digit Replacement and Subsegment Length

Filed under Infosys

Given a numeric string S of length N and Q point-update queries that replace the digit at index idx with a new digit, find after each query the length of the longest contiguous subsegment in S that…

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 Infosys questions

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