题目要求:给定一棵二叉树的根节点 root,返回其节点值的层序遍历结果,即自顶向下、每一层从左到右,最终输出形如 [[3],[9,20],[15,7]] 的二维数组。 Hint 1 树的「层」指距离根节点相等的一组节点;需要设计一种逐层推进、而不是一路向下的算法 Hint 2 使用 BFS ...
在 LLM 评测中,提示词(prompt)是模型的直接输入,其构造方式会显著影响被评测模型的精度表现。OpenCompass 将"数据集如何变成提示词"这一过程抽象为**数据侧模板(prompt_template)与模型侧模板(meta_template)**两层,让同一份数据既能适配基座模型的补全式评测 ...
A small, well-documented Python library and command-line tool for solving text mazes using three classic path-finding algorithms: ...
Edmonds-Karp BFS Max Flow Algorithm Skill Robust, zero-dependency Python implementation of the Edmonds-Karp Algorithm running in (O (V E^2)) time.
For example, function definitions, loops, assignments, function calls, and operations can be treated as structures distinct from strings. This enables comparisons that are less susceptible to ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果