add the text "O(n*m) time" (#25545)
This commit is contained in:
@ -12,7 +12,7 @@ Some more examples of brute force algorithms are:
|
||||
- A 5-digit password, in the worst case scenario, would take 10<sup>5</sup> tries to crack.
|
||||
- A brute-force algorithm to find the divisors of a natural number n would enumerate all integers from 1 to n, and check whether each of them divides n without remainder.
|
||||
|
||||
The time complexity of brute force is <b> O(n*m) </b>. So, if we were to search for a string of 'n' characters in a string of 'm' characters using brute force, it would take us n * m tries.
|
||||
The time complexity of brute force is <b> O(n*m) </b>. So, if we were to search for a string of 'n' characters in a string of 'm' characters using brute force, it would take O(n*m) time.
|
||||
|
||||
#### More Information:
|
||||
|
||||
|
Reference in New Issue
Block a user