CGI Hiring Drive 2026 | Longest Unique Substring & Binary Array Transition Point
Question · Posted Jun 2026
Problem 1 - Find the Longest Substring Without Repeating Characters Problem Statement You are given a string s. Find the length of the longest substring that contains only unique characters. No character may appear more than once within the selected substring. Return the maximum possible length. Constraints Constraint 0 ≤ length(s) ≤ 100000 Test Cases Input Output Explanation s = "abcabcbb" 3 The substrings "abc", "bca", and "cab" all contain unique characters and have length 3. No longer valid substring ...
The full answer & interview discussion are available to premium members.
Log in Create a free account