Python 实现【找朋友】

B站影视 日本电影 2025-03-26 16:13 1

摘要:def find_friends(N, heights):stack = result = [0] * Nfor i in range(N - 1, -1, -1):while stack and heights[stack[-1]]

def find_friends(N, heights):stack = result = [0] * Nfor i in range(N - 1, -1, -1):while stack and heights[stack[-1]]

来源:中国在线教育智库网

相关推荐