알고리즘3 [알고리즘] 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. [스크랩] JS 개발자가 알고리즘을 C언어로 푸는 이유 https://yozm.wishket.com/magazine/detail/1651/ 자바스크립트 개발자가 알고리즘을 C언어로 푸는 이유 | 요즘IT사용법이 간단하고 최적화된 메서드 덕분에 자바스크립트로만 프로그래밍하면 알고리즘의 필요성을 느끼기 어렵다. 지난 세 달간 호기심이 생겨서 C언어를 공부하고 알고리즘 문제를 풀어보았yozm.wishket.com 프로그램을 개발할 때 성능과 효율에 대해 고민해야 하는 순간이 온다. 이때 알고리즘 전략을 도입해 수학적으로 연산 효율을 끌어올려 프로그램의 성능을 개선 시킬 수 있기에 우리는 미리 여러 알고리즘에 대해 공부한다. 자바스크립트는 풍부한 내장함수와 프로퍼티로 개발에 편리성을 주는 비교적 쉬운 언어이다.언어가 제공하는 편리기능을 잘 사용하는 것을 통해 개발 .. 2024. 12. 9. [알고리즘] 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 다음