Coding test/Leet Code

⭐️ 난이도 Easy ⭐️ 문제 https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 You are climbing a staircase. It takes n steps to reach the top. 당신은 계단을 오르고 있다. 계단을 모두 오르기까지는 총 n개의 계단을 올라야 한다. Each time you can either climb 1 or 2 ..
⭐️ 난이도 Medium ⭐️ 문제 https://leetcode.com/problems/validate-binary-search-tree/ Validate Binary Search Tree - 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 Given the root of a binary tree, determine if it is a valid binary search tree (BST). 이진 트리의 루트가 주어졌을 때, 그것이 유효한 BST인지 검사하시오...
⭐️ 난이도 Easy ⭐️ 문제 https://leetcode.com/problems/same-tree/ Same Tree - 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 Given the roots of two binary trees p and q, write a function to check if they are the same or not. binary tree 두개 p와 q의 root가 주어졌을 때, 두 개의 트리가 서로 같은지 아닌지 여부를 확인하는..
⭐️ 난이도 Medium ⭐️ 문제 https://leetcode.com/problems/time-needed-to-inform-all-employees/submissions/ Time Needed to Inform All Employees - 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 회사에 n명의 직원이 있고, 각각의 직원에게는 0 ~ n-1까지 고유 ID가 있다. CEO만 headID를 가지고 있다. 각 직원에게는 manager가 있는데, manager..
⭐️ 난이도 Easy ⭐️ 문제 https://leetcode.com/problems/maximum-depth-of-binary-tree/ Maximum Depth of Binary Tree - 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 이진 트리의 root가 주어졌을 때, 최대 깊이(depth)를 구하라. ⭐️ Follow-up X ⭐️ Idea flow 최대 depth를 구하기 위해서는 사용할 수 있는 두 가지 방법이 있다. BFS와 DFS인데 root ..
⭐️ 난이도 Medium ⭐️ 문제 https://leetcode.com/problems/number-of-islands/ Number of Islands - 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 크기가 m x n인 2차원 배열이 주어진다. '1'은 땅을 '0'은 물을 뜻한다. 이때, 섬의 개수를 구하시오. 섬은 물로 둘러싸여 있고, 수직/수평으로 인접한 땅을 이음으로서 형성된다. 또한 배열의 네 모서리가 모두 물로 둘러싸여 있다고 가정한다. ⭐️ Fo..
HEY__
'Coding test/Leet Code' 카테고리의 글 목록 (2 Page)