Duplicate Characters in a String
Given a string 'S' of length 'N', identify and return all the characters in the string that appear more than once along with their frequency.
Example:
Input:
N = 5
S = 'GEEK'
Output:
[('E', 2)]
Explanation:
The character 'E' is the only one duplicated in the string with a frequency of 2.
Constraints:
- 1 <= T <= 5
- 1 <= N <= 10^5
Time Limit: 1 second
Be the first one to answer
Add answer anonymously...
Top Thales Software Engineer interview questions & answers
Popular interview questions of Software Engineer
Top HR questions asked in Thales Software Engineer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app