|Felix Halim .NET|
University Experience IOI 2002 Yong In, Korea ACM ICPC Regional Manila 2003 ACM ICPC Regional Manila 2004 ACM ICPC Regional Manila 2005 ACM ICPC Regional Kaohsiung 2006 ACM ICPC Regional Singapore 2007 ACM ICPC Regional Jakarta 2008 (ext) ACM ICPC Regional Jakarta 2009 (ext) ACM ICPC Regional Jakarta 2010 ACM ICPC Regional Jakarta 2012 - Problem H (new!) ACM ICPC World Final Tokyo 2007 Google India Code Jam 2005 Google India Code Jam 2006 Indonesia National Contest 2007 Indonesia National Contest 2008 Indonesia National Contest 2010 Facebook Hacker Cup 2011
You will be given two Strings pattern and letters, containing uppercase letters ('A' - 'Z'). pattern can contain also several '?', representing hidden characters. You are to return the lexicographically earliest string which can be derived from pattern by replacing each '?' character with a character from letters. Each character from letters can be used only once per occurrence in letters.
Class: PatternFiller Method: fill Parameters: String, String Returns: String Method signature: String fill(String pattern, String letters) (be sure your method is public)
If letters contains several identical characters, each of them can be used exactly once (see example 1).
0) "AB??ACA?BA" "GRAYCODE" Returns: "ABACACADBA" 1) "??T?" "SEASEA" Returns: "AATE" 2) "A??A" "BABA" Returns: "AAAA" 3) "AB?SF?G??F???" "ABACABA" Returns: "ABASFAGAAFBBC" 4) "?NJOYTHECONTE??" "TSE" Returns: "ENJOYTHECONTEST"
This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.
Google India Code Jam 2006 - Table of Contents