리트코드2 [알고리즘] Roman to Integer - Java - LeetCode Roman to IntegerRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 500M 1000For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II.Roman numerals are usually written largest to smallest from left to right. H.. 2024. 12. 10. [알고리즘] Palindrome Number - Java - LeetCode Palindrome NumberGiven an integer x, return true if x is apalindrome, and false otherwise.Example 1:Input: x = 121Output: trueExplanation: 121 reads as 121 from left to right and from right to left.내 제출class Solution { public boolean isPalindrome(int x) { if(x정답class Solution { public boolean isPalindrome(int x) { if(x내 제출도 정답조건에 맞아 통과되었지만 시행시간이 8ms 로 매우 느렸음런타임이 빠른 솔루션을 확인했더니.. 2024. 12. 9. 이전 1 다음