
백준 - 회전하는 큐 1021
2023. 1. 27. 22:15
알고리즘(BOJ)/Silver
문제 풀이 왼쪽과 오른쪽 움직이는 방법에 생각해 봤다. 나중에 LinkedList 에 간단한 함수들이 있는걸 알았지만, 문제를 풀 당시에는 몰랐던 지식이다. String으로 잘라서 붙이는 방법을 사용했다. 전체소스 import java.util.*; import java.io.*; public class Main { static String str; static int size; static String str_left; static String str_right; public static int left(int c) { int poll = 0; int count = 0; str_left = str; while (true) { poll = Integer.parseInt(str_left.substring(..