전체 글(714)
-
1791. Find Center of Star Graph
class Solution: def findCenter(self, edges: List[List[int]]) -> int: inbound = collections.defaultdict(int) mx = -1 node = -1 for u, v in edges: inbound[u] += 1 inbound[v] += 1 if inbound[u] > mx: mx = inbound[u] node = u if inbound[v] > mx: mx = inbound[v] node ..
2026.05.10 -
1926. Nearest Exit from Entrance in Maze
class Solution: def nearestExit(self, maze: List[List[str]], entrance: List[int]) -> int: sy, sx = entrance q = collections.deque([(sy, sx, 0)]) visited = {(sy, sx)} rows = len(maze) cols = len(maze[0]) while q: y, x, step = q.popleft() if maze[y][x] == '.' and (y == rows - 1 or y == 0 or x == 0 or x == cols - 1) \ ..
2026.05.10 -
1930. Unique Length-3 Palindromic Subsequences
1930. Unique Length-3 Palindromic Subsequences [Unique Length-3 Palindromic Subsequences - LeetCodeCan you solve this real interview question? Unique Length-3 Palindromic Subsequences - Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways to obtain the same subseleetcode.com](https://leetcode.com/problems..
2026.05.10 -
Lowfree flow 2 keyboard manual
low free flow 2 manual 뒤에 wifi 쪽으로 switch toggle 후 FN + 1, 2, 3은 BT오래 누르면 pairing깜박임이후 장치 pair 되면, caps light가 3초간 유지되고 꺼짐짧게 누르면 switching FN + 42.4 GHz dongle 연결2.4 연결 실패 시 fn+4를 3초간 유지 blue flashing까지 이후 다시 replugcaps lock lightwhiteblue깜박임은 연결 되면 3초간 유지하다가 꺼짐 ambient lightfn 좌/우steady/breath/off system switchfn + nwindows/androidfn + mmac/iOScmd + tab으로 앱 전환 되면 mac 모드, opt + tab으로 전환되면 w..
2026.05.09 -
3889. Mirror Frequency Distance
class Solution: def mirrorFrequency(self, s: str) -> int: freq = collections.Counter(s) diff = 0 visited = set() for ch in set(s): if ch in visited: continue if ch.isalpha(): letter = chr(ord('z') - (ord(ch) - ord('a'))) else: letter = chr(ord('9') - (ord(ch) - ord('0'))) visit..
2026.04.05 -
3882. Minimum XOR Path in a Grid
def minCost(self, grid: list[list[int]]) -> int: rows = len(grid) cols = len(grid[0]) mem = collections.defaultdict(lambda: set()) def dfs(y, x, inc, mn): if y > rows - 1 or x > cols - 1: return cur = inc ^ grid[y][x] if (y, x) in mem and cur in mem[(y, x)]: return mem[(y, x)].add(cur) ..
2026.04.05