일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- 백준
- github
- 자료형
- hash table
- SasS
- Algorithm
- 코딩테스트
- leetcode
- java
- 변수
- Python
- JS
- 알고리즘
- 파이썬
- JavaSceipt
- greedy
- HTML
- dynamic programming
- 프로그래머스
- array
- vue.js
- JavaScript
- scss
- string
- CSS
- math
- 컴포넌트
- sorting
- 자료구조
- computed
- Today
- Total
목록알고리즘/leetcode (12)
Posis
[LeetCode][JavaScript] 9. Palindrome Number 문제 출처: 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 문제 설명 숫자를 뒤집고 Input의 값과 동일하면 true, 틀리다면 false 단, 음수일 경우 무조건 false입니다. [직접 푼 코드] var isPalindrome = function (x) { ..
[LeetCode][JavaScript] 88. Merge Sorted Array 문제 출처: https://leetcode.com/problems/merge-sorted-array/ Merge Sorted Array - 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 [직접 푼 코드] var merge = function (nums1, m, nums2, n) { nums1.splice(m, n, ...nums2); nums1.sort((a, b) => a - b..
[LeetCode][JavaScript] 561. Array Partition I 문제 출처: https://leetcode.com/problems/array-partition-i/ Array Partition I - 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 [직접 푼 코드] var arrayPairSum = function(nums) { nums.sort((a,b) => a-b) let result = 0 for(let i=0; i
[LeetCode][JavaScript] 1436. Destination City 문제 출처: https://leetcode.com/problems/destination-city/ Destination City - 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 [직접 푼 코드] var destCity = function(paths) { let dest = paths[0][1] while(true){ const _newDest = paths.find(path =>..
[LeetCode][JavaScript] 70. Climbing Stairs 문제 출처: https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 [직접 푼 코드] var climbStairs = function (n) { if (n < 3) return n; let first = 1; let second = 2; for (let i = 3; i
[LeetCode][JavaScript] 1323. Maximum 69 Number 문제 출처: https://leetcode.com/problems/maximum-69-number/ Maximum 69 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 [직접 푼 코드] var maximum69Number = function(num) { var str = num.toString(); var res = str.replace('6','9'); retur..