Test/Coding Tests [LeetCode] 9. Palindrome Number - 문제 Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. → 대칭수 답 class Solution { func isPalindrome(_ x: Int) -> Bool { return String("\(x)".reversed()) == "\(x)" } } → x를 String으로 변환하여 reversed()를 사용하여 출력 728x90 공유하기 게시글 관리 구독하기Joey의 블로그 'Test > Coding Tests' 카테고리의 다른 글 [BaekJoon] 11021번 A+B - 7 (0) 2022.09.16 [BaekJoon] 25304번: 영수증 (0) 2022.09.16 [BaekJoon] 2480번 : 주사위 세개 (0) 2022.09.05 [BaekJoon] 8393번 : 합 (0) 2022.09.04 [BaekJoon] 2884번: 알람 시계(Swift) (0) 2022.07.31 Contents 당신이 좋아할만한 콘텐츠 [BaekJoon] 11021번 A+B - 7 2022.09.16 [BaekJoon] 25304번: 영수증 2022.09.16 [BaekJoon] 2480번 : 주사위 세개 2022.09.05 [BaekJoon] 8393번 : 합 2022.09.04 댓글 0 + 이전 댓글 더보기