首页 > TAG信息列表 > LeetCode386
LeetCode386 字典序排数
LeetCode386 字典序排数 构造字典树,dfs遍历记录 class Solution: def lexicalOrder(self, n: int) -> List[int]: ans = [] def dfs(cur): if cur <= n: ans.append(cur) else: returnLeetCode386 字典序排数
LeetCode386 字典序排数 构造字典树,dfs遍历记录 class Solution: def lexicalOrder(self, n: int) -> List[int]: ans = [] def dfs(cur): if cur <= n: ans.append(cur) else: return