Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- AWS
- Django
- AZ-900
- EC2
- Python
- terraform
- POD
- AZ-104
- Service
- Deployment
- Kubernetes
- elasticsearch
- K8S
- AZURE
- asgi
- ebs
- EKS
- leetcode
- ansible
- DevOps
- Role
- IAC
- dockerfile
- docker
- 자바스크립트
- IAM
- asyncio
- FastAPI
- RBAC
- Network
Archives
- Today
- Total
목록LCA (1)
궁금한게 많은 개발자 노트
[ leetcode ] 235. Lowest Common Ancestor of a Binary Search Tree
Binary Search Tree가 주어졌을 때, 서로 다른 두 노드의 가장 낮은 level의 공통 조상을 찾는 문제입니다. (Lowest Common Ancestor) BST의 특성을 잘 이해하여 한 노드의 값보다 크면 오른쪽 자식, 작으면 왼쪽 자식에 존재한다는 개념을 이용합니다. /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* ..
Algorithm
2023. 5. 2. 10:46