[LeetCode/Typescript] 9. Palindrome Number 정답
·
Algorithm/LeetCode
문제 https://leetcode.com/problems/palindrome-number/ Palindrome Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 정답 function isPalindrome(x: number): boolean { let result = true; let stringX = x.toString(); for(let i = 0; i < stringX.length; i++) { if(stringX[i] !== stringX...
[LeetCode/Typescript] 1. Two Sum 정답
·
Algorithm/LeetCode
문제 https://leetcode.com/problems/two-sum/ Two Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 정답 function twoSum(nums: number[], target: number): number[] { const result = []; for(let i = 0; i < nums.length; i++) { for(let j = i + 1; j < nums.length; j++) { const sum = nums[i..
얼은펭귄
'Algorithm/LeetCode' 카테고리의 글 목록