
Reverse Linked list # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseList(self, head: ListNode) -> ListNode: prev = None curr = head while curr: nex = curr.next curr.next = prev prev = curr curr = nex return prev Linked List Palindrome # Definition for singly-linked list. # class ListNode..

Description Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Answer class Solution: def addBinary(self, a: str, b: str) -> str: i = int(a,2) j = int(b,2) # ans = i+j # return bin(ans)[2:] return format(i+j,'b') 진수 변환 >> bin(30) '0b1110' >> oct(30) '0o36' >> hex(30) '0x1e' Format 함수 # 접두어 제외하기 >> format(0b..

Problem no.93 Restore IP Address Question: Given a string containing only digits, restore it by returning all possible valid IP address combinations. A valid IP address consists of exactly four integers (each integer is between 0 and 255) separated by single points. Solution: class Solution: def restoreIpAddresses(self, s: str) -> List[str]: l = len(s) if l 4*3: return [] ans = set() ..
- Total
- Today
- Yesterday
- Kubernetes
- Binary
- AWS
- feed-forward
- Gemma
- Git
- collator
- palindrome
- Container
- 파이썬
- Shell
- Algorithm
- kubens
- docker
- book
- Fine-Tuning
- error
- leetcode
- BASIC
- lllm
- Python
- 한빛미디어
- 책리뷰
- csv
- 나는리뷰어다
- LLM
- go
- 키보드
- K8S
- kubernetes context
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |