전체 글 372

공간의 끝 / While and For space

// Operating Palindrome(2/2) int i = N; while (true) { if (A[i] != 0) { int result = A[i]; // Output Extracting Cable if (isPalindrome(result)) { System.out.println(result); break; } } i++; } 공간의 끝과 시행횟수가 명확하다면 for로 쓸 수 있지만, 그러지 못한 경우 우선 while(true)로 kaiten 시킨 후에, 끝의 조건인 if 와 break;를 설정한다 i++는 시행간격(for)와 동일 for는 실행되기 전 이미 시행공간 배치가 완료, projected된 것 while은 projecting하는 potetntial을 가지고 있으며 실행시에 확인 ..

Hard deck/Deep dive 2022.08.03