반응형 leetcode2 <Solution> 17.Letter Combinations of a Phone Number 17.Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. Example 1: Input: digits = "23" Output: ["ad","ae","af","bd","be","bf","cd.. 2022. 9. 17. [LeetCode.454][middle] 4Sum II https://leetcode.com/problems/4sum-ii/ 4Sum II - 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 초기 접근 방법 일단 브루트포스 알고리즘으로 접근했다. 모든 경우의 수를 4중 for loop 돌려서 전체를 탐색했다. 테스트케이스는 통과했지만, 시간초과 에러로 실패했다. 초기 코드 class Solution { public: int fourSumCount(vector& nums1, vector& nums2, vector& nu.. 2021. 10. 28. 이전 1 다음 반응형