Saturday, September 20, 2014

in big O notation

O(n)implies an algorithmic solution may happen with just one loop through a collection of items
O(n²)implies that each or potentially each item in the outer loop has to churn through a second loop in the name of finding a solution to our problem so iterating over 8 things could have up to 64 steps (8x8)
O(n³)three loops! we're are starting to have performance problems... DANGER!

No comments:

Post a Comment