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
- npm package
- github pdf
- ffi-napi
- camera access
- augmentedDevice
- Each child in a list should have a unique "key" prop.
- github lfs
- html
- ELECTRON
- Can't resolve
- camera permission
- custom printing
- device in use
- silent printing
- vercel git lfs
- Failed to compiled
- react-native-dotenv
- adb connect
- 이미지 데이터 타입
- adb pair
- nextjs
- Git
- github 100mb
- 티스토리 성능
- electron-packager
- rolldown
- react-native
- Recoil
- animation
- dvh
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 |