일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 리트코드
- OpenShift
- SpringBoot
- 메세지큐
- Docker
- GPT
- jpa
- 컨설팅
- LLaMa
- k8s
- 로깅
- vuejs
- Python
- fast api
- vue.js
- Machine Learning
- 생성형
- 생성형 AI
- 도커
- BFS
- fastapi
- POD
- 컨설턴트
- 머신러닝
- kubernetes
- 솔루션조사
- 쿠버네티스
- Redis
- LeetCode
- 오픈시프트
- Today
- Total
목록분류 전체보기 (77)
수 많은 우문은 현답을 만든다
Question : The height of a binary tree is the number of edges between the tree's root and its furthest leaf. For example, the following binary tree is of height 2 input : 3 5 2 1 4 6 7 result : 3 참조 : 원문링크 풀이 : 더보기 def height(root): if root is None: return -1 //0으로 하고 마지막에 맞춰도 된다. left_size = height(root.left) right_size = height(root.right) return 1 + max(left_size, right_size) //핵심은 방문시 +1을 높여..
Write a function that takes the binary representation of an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed integer type. It should not affect your implementation, as the integer's internal binary representation is th..
Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. Example 1: Input: nums = [2,2,1] Output: 1 Example 2: Input: nums = [4,1,2,1,2] Output: 4 Example 3: Input: nums = [1] Output: 1 풀이 더보기 class Solution: def singleNumber(self, nums: List[int]) ..
문제 Given a binary tree, determine if it is height-balanced Example 1: Input: root = [3,9,20,null,null,15,7] Output: true Example 2: Input: root = [1,2,2,3,3,null,null,4,4] Output: false Example 3: Input: root = [] Output: true 풀이 더보기 class Solution: def isBalanced(self, root: Optional[TreeNode]) -> bool: def balance(node): if not node: return 0 left = balance(node.left) right = balance(node.righ..
Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Example 1: Input: root = [3,9,20,null,null,15,7] Output: 3 Example 2: Input: root = [1,null,2] Output: 2 풀이 더보기 if not root: return 0 left = self.maxDepth(root.left) right = self.maxDepth(root.right) return max(l..
Given the root of a binary tree, invert the tree, and return its root. Input: root = [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1] Example 2: Input: root = [2,1,3] Output: [2,3,1] Example 3: Input: root = [] Output: [] 풀이 더보기 class Solution: def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: if not root: return None left = self.invertTree(root.left) right = self.invertTree(root.righ..
문제 You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. Example 1: Input: list1 = [1,2,4], list2 = [1,3,4] Output: [1,1,2,3,4,4] Example 2: Input: list1 = [], list2 = [] Output: [] Example 3: Input: list1 = [], list2 = ..
안녕하세요 조영호입니다. 오늘은 Transational 어노테이션을 사용하면서 발생했던 한 가지 문제에 대해서 공유하고자 합니다. @Transactional 이 선언된 하나의 메소드에서 내부적으로 3개의 메소드를 호출하고 있는 메소드에서 아래 오류가 발생했습니다. 오류내용 Aborted connection - Error enlisting in transaction - connection might be broken? Please check the logs for more information... - nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement: the XA resource has be..
문제 Given the head of a singly linked list, reverse the list, and return the reversed list. 우선 구조를 파악하고 코딩해보자. head의 구조는 어떻게 생겼을까? 펼치기 더보기 head : ListNode{val:1, next:ListNode{val:2, next: None}} 그럼 head는 어떻게 선언을 했을까? 이해를 위해 역으로 생각보자. 펼치기 더보기 head = ListNode(1) head.next = ListNode(2) head.next.next = ListNode(3) 풀이 더보기 # Definition for singly-linked list. # class ListNode: # def __init__(self, v..
High Performance Browser Networking The "High Performance Browser Networking" aims to improve the loading speed of web pages. Network Techniques to improve browser performance HTTP/2: a single connection can handle multiple requests and responses Caching: a technique of storing resources from servers in browser to reuse. DNS Prefetch : a technique to reduce the time for translating DNS in websi..