We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 209bc48 commit 410510eCopy full SHA for 410510e
searches/linear_search.nim
@@ -7,7 +7,7 @@
7
## The search ends when the element is located or when the end of the array is reached.
8
## https://en.wikipedia.org/wiki/Linear_search
9
##
10
-## Time Complexity: O(n)
+## Time Complexity: O(n) where n is the length of the array.
11
## Space Complexity in for-loop linear search: O(1)
12
## Space Complexity in recursive linear search: O(n)
13
## Notice that recursive algorithms are nice to write and provide elegant implementations,
0 commit comments