I was just about going crazy over my Data Structures and Algorithms homework when I thought mebby I should pay a visit to good old PPT and see if y'all could help me. Guess it's been awhile, since my username didn't exist anymore! Anyhow, we're learning about Big Oh notation, which I should know by now, since I learned about it for the first time three semesters ago. But, I just don't get it. Think any of you could help me on the basics? I know the Big Oh for searches, etc, like a linear search takes O(n), and a binary search takes O(log n), but how do you decide what Big Oh is for a regular snippet of code? It's so confusing!
Thanks, m'dears!
|