constdata={name:'A',child:[{name:'AB',child:[{name:'AABA'},{name:'AABB'}]},{name:'AC',child:[{name:'AACA'},{name:'AACB'}]}]}//请自行封装一个findPath的函数,实现如下效果//调用示例findPath('AABB');//["A","AB","AABB"]findPath('AABA');//["A","AB","AABA"]findPath('AACB');//["A","AC","AACB"]findPath('AC');//["A","AC"]findPath('AACA');//["A","AC","AACA"]
宝慕林4294392
相关分类