Help Aryan
Help Aryan easy asked in interviews by 1 company Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Help Aryan easy asked in interviews by 1 company Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement:
Aryan was given a string, He was asked to print the first and last repeated character in a string. Input The first line of the input contains a string str.
Constraints 1 ≤ |str| ≤ 105 Output Print the first and last repeated character of a string. Example Sample Input newtonschool
Sample Output n o
Explanation The first repeated character is n as it occurs 2 times in complete string and the last repeated character is o.
link: