[JAVA] 단어 뒤집기 - String(문자열)
·
💡 Algorithm/인프런
public class INF0104T2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String[] arr = new String[n]; for (int i = 0; i < n; i++) { arr[i] = sc.next(); } INF0104T2 inf = new INF0104T2(); for(String s : inf.solution(n, arr)) { System.out.println(s); } } public ArrayList solution(int n, String[] arr) { ArrayList answer = new ArrayList(); //직접 뒤집..