好词典

backtracking

UK //ˈbæktrækɪŋ//US //ˈbæktrækɪŋ//

词源

由 'back'(向后)和 'track'(追踪)组合而成,最早用于描述追踪路径时的后退行为。

noun

❶ 回溯法,指在解决问题时,当发现当前路径无法达到目标时,退回到上一步重新选择其他路径的算法策略。

“The algorithm uses backtracking to find all possible solutions.”

(该算法使用回溯法来找到所有可能的解。)

“Backtracking is often used in solving puzzles like Sudoku.”

(回溯法常用于解决数独等谜题。)

同义词:retracing, reversing, backstepping

verb

❶ 回溯,指在探索或决策过程中因遇到困难而返回上一步重新尝试。

“The hikers had to backtrack when they realized they took the wrong path.”

(徒步者意识到走错路后不得不原路返回。)

“She backtracked on her decision after hearing new evidence.”

(在听到新证据后,她撤销了之前的决定。)

同义词:retreat, reverse, retrace

常见短语

backtracking algorithm — 回溯算法,一种通过尝试所有可能的路径并在失败时返回的算法,常用于解决组合问题。

“The backtracking algorithm efficiently solves the N-Queens problem.”

(回溯算法能高效解决N皇后问题。)