From 69bed590368a10479a9ad225402aa540628a0457 Mon Sep 17 00:00:00 2001 From: Erfan Alimohammadi Date: Sat, 6 Jul 2019 20:01:52 +0430 Subject: [PATCH] Fix backtrack time complexity (#965) * Update backtracking/all_permutations.py --- backtracking/all_permutations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backtracking/all_permutations.py b/backtracking/all_permutations.py index 8c332970b..299b708fe 100644 --- a/backtracking/all_permutations.py +++ b/backtracking/all_permutations.py @@ -2,7 +2,7 @@ In this problem, we want to determine all possible permutations of the given sequence. We use backtracking to solve this problem. - Time complexity: O(n!), + Time complexity: O(n! * n), where n denotes the length of the given sequence. '''