Swiggy | Balanced Strings | Traffic Jam Detection | Sliding Window & String Substrings | Jan 29th 2026 | Complete Solutions & Tips | Sliding Window & String Substrings

Swiggy · Question · Posted Mar 2026

Question 1: Debugging - Balanced strings Max. score: 50.00 Background: You are given a code for the following problem statement in the solve function. However, the solution fails the test cases because there are bugs in the code. Your task is to find and fix the bugs so that it passes all the test cases. Statement: You are given a string S consisting of lowercase English alphabets. A string is called a balanced string if it contains an equal number ...

The full answer & interview discussion are available to premium members.

Log in Create a free account