Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4a56950

Browse files
Update Construct the Lexicographically Largest Valid Sequence
1 parent c2656d7 commit 4a56950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Daily Question/2025/February/Construct the Lexicographically Largest Valid Sequence

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Time Complexity : O(n!) for there are n! possible sequence
66
n * (n - 1) * (n - 2) ... * 1 = O(n!) )
77
Space Complexity : O(n! for the recursion (recursion depth = O(n))
88

9-
實務上運算找到解的速度會比複雜度快上許多,因為設定上只要一找到解就可以回傳(同時題目保證一定有解);同時因為有許多不可能的狀態已經被剪枝,進一步加快速度
9+
實務上運算找到解的速度會比複雜度快上許多,因為設定上只要一找到解就可以回傳(題目保證一定有解);同時因為有許多不可能的狀態已經被剪枝,進一步加快速度
1010

1111
class Solution {
1212
public:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /