1087-Brace-Expansion
Sat 17 May 2025
https://leetcode.com/problems/brace-expansion
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def expand(self, s: str) -> List[str]:
    ans = []
    def dfs(i: int, path: List[str]) -> None:
      if i == len(s):
        ans.append(''.join(path))
        return
      if s[i] == '{':
        nextRightBraceIndex …Category: leetcode
Read More