Path destroy algorithm