Sprinklr | Jan 17, 2024 | Good Character | Coding Round
Sprinklr · Question · Posted Apr 2026
Problem: Good Character Problem Description: Find the character that appears most often across all possible substrings of a given string. If there are multiple characters with the same highest frequency, return the one that is smallest in lexicographical order (e.g., 'a' is smaller than 'b'). Function Description: Complete the solve() function. It takes two parameters: N: Represents the length of the string. S: Represents the string. Input Format for Custom Testing The first line contains T, the number of test ...
The full answer & interview discussion are available to premium members.
Log in Create a free account