Swiggy On-Campus OA 2026 | Traffic Jam Detection | Sliding Window Solution
Swiggy · Question · Posted Jun 2026
Problem 1 - Traffic Jam Detection Problem Statement You are given a traffic string of length N, where each character is either: 'H' — Heavy traffic block 'L' — Light traffic block You are also given an integer K, representing the maximum number of detours your delivery partner can take. Each detour allows you to convert one 'L' block into an 'H' block. Find the length of the longest contiguous segment of the highway that can consist entirely of 'H' ...
The full answer & interview discussion are available to premium members.
Log in Create a free account