
List only def is_palindrom(s: str) -> bool: strs = [] # Using deque for char in s: if char.isalnum(): strs.append(char.lower()) while len(strs) > 1: if strs.pop(0) != strs.pop(): return False return True Using deque from collections import deque def is_palindrom(s: str) -> bool: strs = deque([]) for char in s: if char.isalnum(): strs.append(char.lower()) while len(strs) > 1: if strs.popleft() !=..

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..
- Total
- Today
- Yesterday
- go
- leetcode
- Kubernetes
- docker
- Shell
- BASIC
- lllm
- feed-forward
- 한빛미디어
- error
- Git
- Gemma
- 책리뷰
- LLM
- Python
- Container
- palindrome
- 나는리뷰어다
- Algorithm
- Fine-Tuning
- kubernetes context
- Binary
- collator
- book
- K8S
- csv
- kubens
- 파이썬
- 키보드
- AWS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |