Skip to content

Commit

Permalink
[DFS] add Time Complexity for Combination Sum I, II, III
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Jun 30, 2016
1 parent bf59f17 commit 117c665
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DFS/CombinationSum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Question Link: https://leetcode.com/problems/combination-sum/
* Primary idea: Classic Depth-first Search
*
* Time Complexity: O(n^n)
* Time Complexity: O(n^n), Space Complexity: O(n^n)
*
*/

Expand Down
2 changes: 1 addition & 1 deletion DFS/combinationSumII.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Question Link: https://leetcode.com/problems/combination-sum-ii/
* Primary idea: Classic Depth-first Search
*
* Time Complexity: O(n!)
* Time Complexity: O(n!), Space Complexity: O(n!)
*
*/

Expand Down
2 changes: 1 addition & 1 deletion DFS/combinationSumIII.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Question Link: https://leetcode.com/problems/combination-sum-iii/
* Primary idea: Classic Depth-first Search
*
* Time Complexity: O(n!)
* Time Complexity: O(n!), Space Complexity: O(n!)
*
*/

Expand Down

0 comments on commit 117c665

Please sign in to comment.