Leet/Daily
-
1835. Find XOR Sum of All Pairs Bitwise ANDLeet/Daily 2022. 8. 24. 01:08
https://leetcode.com/problems/find-xor-sum-of-all-pairs-bitwise-and/ Find XOR Sum of All Pairs Bitwise AND - 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 문제 주어진 두 배열의 모든 원소 쌍을 각각 \(AND\) 연산한 결과를 이용하여 누적 \(XOR\) 값을 구하자 풀이 우선 배열의 모든 원소 쌍의 \(AND\) 값을 구하는 것은\(O(N^2)\) 시간이 걸리므로 \(N (..
-
114. Flatten Binary Tree to Linked ListLeet/Daily 2022. 7. 27. 21:35
https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ Flatten Binary Tree to Linked List - 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 문제 Binary tree를 pre-order traversal 순서에 따라 linked list로 flatten 시키기 단, linked list는 주어진 binary tree의 구조에서 left child는 null이고 right ..