| 
 | 
back to boardFor Time limit exceeded: If you get time limit exceeded, it must mean that you're trying to modify the input string (i.e. trying to delete i-th chars). Try creating a new OUTPUT string without modifying the INPUT string.   Note: if you're using a high language such as java or C#, try using the StringBuilder object to build your output string.   For Wrong Answer(WA): If you get WA, try some of these test cases:   Input: "dddd" Output: ""   Input: "ddddd" Output: "d"   Input: "abba" Output: ""   Input: "abbbbac" Output: "c"   Input: "wliisddsmmleeddw" Output: ""   Input: "avcbbffcv" Output: "a"   Hope this helps.   Edited by author 12.07.2012 00:47 Input: "abbbbac" Output: "c" Спасибо, помогло! For Time limit exceeded: If you get time limit exceeded, it must mean that you're trying to modify the input string (i.e. trying to delete i-th chars). Try creating a new OUTPUT string without modifying the INPUT string.   Note: if you're using a high language such as java or C#, try using the StringBuilder object to build your output string.   For Wrong Answer(WA): If you get WA, try some of these test cases:   Input: "dddd" Output: ""   Input: "ddddd" Output: "d"   Input: "abba" Output: ""   Input: "abbbbac" Output: "c"   Input: "wliisddsmmleeddw" Output: ""   Input: "avcbbffcv" Output: "a"   Hope this helps.   Edited by author 12.07.2012 00:47  Thanks a lot...I could'n understand the problem statement first, now, reading ur comment I clearly understood the problem. for me problem was that program was returning "axx" on "aaaxx"   Edited by author 18.03.2017 19:56  |  
  | 
|