TopCoder problem "ProseFlip" used in TCCC06 Qual 2 (Division I Level One)



Problem Statement

    Each element of text is a line of prose from some passage. You will return a String[] that is read downward as opposed to left-to-right. That is, the first element of text will correspond to the first "column" of the returned String[], and so forth.
 

Definition

    
Class:ProseFlip
Method:getFlip
Parameters:String[]
Returns:String[]
Method signature:String[] getFlip(String[] text)
(be sure your method is public)
    
 

Constraints

-text will contain between 1 and 50 elements, inclusive.
-Each element of text will contain between 1 and 50 characters, inclusive.
-Each element of text will contain the same number of characters.
-Each character in text will be an uppercase letter ('A'-'Z').
 

Examples

0)
    
{
"AAA",
"BBB",
"CCC"
}
Returns: {"ABC", "ABC", "ABC" }
Rows of the input become columns of the return value.
1)
    
{"AAAAAAAAAAAAA"}
Returns: {"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A" }
One long row.
2)
    
{
"A",
"A",
"A",
"A",
"A"
}
Returns: {"AAAAA" }
One long column.

Problem url:

http://www.topcoder.com/stat?c=problem_statement&pm=4639

Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=10094&pm=4639

Writer:

AdminBrett

Testers:

PabloGilberto , vorthys , Olexiy

Problem categories:

Simple Search, Iteration