Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- rolldown
- camera access
- adb connect
- react-native
- ffi-napi
- augmentedDevice
- Git
- ELECTRON
- Failed to compiled
- dvh
- device in use
- silent printing
- github lfs
- github pdf
- github 100mb
- animation
- adb pair
- camera permission
- electron-packager
- custom printing
- nextjs
- react-native-dotenv
- 티스토리 성능
- vercel git lfs
- 이미지 데이터 타입
- Can't resolve
- Each child in a list should have a unique "key" prop.
- Recoil
- npm package
- html
Archives
- Today
- Total
Bleeding edge
[LeetCode] 43. Multiply Strings - 자바스크립트 0609 본문
https://leetcode.com/problems/multiply-strings/
Multiply Strings - 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
주어진 2개의 String을 곱하는 간단한 문제이다. 문제는 제한사항을 보면 매우큰 수를 곱하는경우가 있었는데,
지금까지 코딩테스트를 하다보면 항상 Max safe integer이 왜 있는지 그리고 자바스크립트가 왜 부동소수점인지 알 수 있는 문제였다.
var multiply = function(num1, num2) {
return String(BigInt(num1)*BigInt(num2))
};
문제는 단순하다. 다만 Number(num1)을 BigInt(num1)으로 바꿔야 할 뿐!
'코딩테스트 공부' 카테고리의 다른 글
[LeetCode] 2287. Rearrange Characters to Make Target String - 자바스크립트 0610 (0) | 2022.06.10 |
---|---|
[LeetCode] 2293. Min Max Game - 자바스크립트 0610 (0) | 2022.06.10 |
[LeetCode]796. Rotate String - 자바스크립트 0609 (0) | 2022.06.09 |
[leetcode] 34. Find First and Last Position of Element in Sorted Array - 자바스크립트 0607 (0) | 2022.06.07 |
[leetcode] 28. Implement strStr() - 자바스크립트 0607 (0) | 2022.06.07 |