Notice
Recent Posts
Recent Comments
Link
목록2021/07/05 (1)
잡다한 IT 지식
출처 Majority Element - 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 TreeNode invertTree(TreeNode root) { Queue q = new LinkedList(); if (root == null) { return null; } q.offer(root); while (!q.isEmpty()) {..
알고리즘 문제 풀이/BFS
2021. 7. 5. 22:06