898 bitwise Ors of Subarrays1 LeetCode - 898 - bitwise Ors of Subarrays - swift https://leetcode.com/problems/bitwise-ors-of-subarrays Bitwise ORs of Subarrays - 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 꽤 어려웠다. 이해하기까지 시간이 걸렸던 문제다. 간단하게 생각하면, 모든 부분연속수열들를 구하여 OR연산하면 되겠지만, 우선 숫자들의 갯수가 최대 5만개이므로, 시간초과가 난다. 조금만 고민해보면, 다음과 같이 알수있다. 주어진 숫자배열을 arr [ i ] 이라고하고, .. 2021. 7. 1. 이전 1 다음