Using procedural parameters and continuations in combinatorial searches
Wen-Ping Hwang, Ching‐Lin Wang · Software Practice and Experience · 1994
Abstract We use procedural parameters as a means to cut off unwanted branches in a search tree. The technique may be used to effect non‐blind backtracking. A recursive algorithm for generating all strings of n pairs of balanced parentheses is chosen as an illustrative example, since it cannot be formulated by conventional recursive backtracking.