递归需要消耗额外的资源,这些资源是:1.递归由于是函数调用自身,而函数调用是有时间和空间的消耗的:每一次函数调用,...[作者空间]
DFS一般的流程是这样的:从一个点出发,遍历其中一个邻居节点w, 然后接着遍历w的一个邻居节点,当遍历到最后一个节...[作者空间]
Network Delay Time There are N network nodes, labelled 1 ...[作者空间]
All Nodes Distance K in Binary Tree We are given a binary...[作者空间]
Given two sequences pushed and popped with distinct value...[作者空间]
Given a list of daily temperatures T, return a list such ...[作者空间]
A string S of lowercase letters is given. We want to part...[作者空间]
Given n pairs of parentheses, write a function to generat...[作者空间]
Given a string containing digits from 2-9 inclusive, retu...[作者空间]