IT/알고리즘90 30★★] Leetcode 1010. Pairs of Songs With Total Durations Divisible by 60 Pairs of Songs With Total Durations Divisible by 60 - 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 #시간초과주의 for문 2번 돌리면 시간초과난다. 앞에 더해서 나머지가 0이 되는 숫자 갯수만큼 pair의 갯수가 늘어난다. class Solution { public: int numPairsDivisibleBy60(vector& time) { int vis[60] = {0}; int ans = 0; for(int i =.. 2020. 7. 10. 29★] Leetcode 1013. Partition Array Into Three Parts With Equal Sum https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/ Partition Array Into Three Parts With Equal 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 int 벡터를 공백이 아니고 합이 같은 세 개의 부분 배열로 나눌 수 있는지 묻는 문제. class Solution { public: bool canThreePartsEqualSum(vec.. 2020. 7. 7. 28] Leetcode 1021. Remove Outermost Parentheses https://leetcode.com/problems/remove-outermost-parentheses/ Remove Outermost Parentheses - 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 바깥 괄호를 제거하는 문제다. (일때 시작하는 괄호인지 )일때 마지막 괄호인지를 확인하면 된다, class Solution { public: string removeOuterParentheses(string S) { string ans = ""; int c.. 2020. 7. 6. 27] Leetcode 1266. Minimum Time Visiting All Points https://leetcode.com/problems/minimum-time-visiting-all-points/ Minimum Time Visiting All Points - 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 가로로 세로로, 대각선으로 한 칸씩 갈 수 있기 때문에 가로, 세로의 차 중에 큰 값으로 더 해주면 된다. class Solution { public: int minTimeToVisitAllPoints(vector& points) { int .. 2020. 7. 6. 이전 1 ··· 13 14 15 16 17 18 19 ··· 23 다음