3 ms·
As a self-taught, I always get nervous when I see articles explaining Big O because they are almost always wrong. While this one is mostly correct, it is a bit
by dizzystar 10y ago
As a self-taught, I always get nervous when I see articles explaining Big O because they are almost always wrong. While this one is mostly correct, it is a bit simplistic and misleading, and it could use considerable annotations. The "scary" Wikipedia article has examples that are more nuanced than what is written here; the first example shows a constant time algorithm with nested for loops.
I take issue with the math fearing throughout the article. Time complexity is math, period. There is no getting around this fact, and the sooner you accept it, the sooner you learn that the math isn't that difficult, and the sooner you realize that, without some intuition on what the math is saying, you'll never really have a firm grasp of Big O or any of the other variations.
And also, why no mention of log time?
- Waterluvian 10y agoAs a self taught programmer who did no math in university, the most valuable thing to me was the discovery that the math really isn't scary. Once you understand the symbols and notation, most concepts are rather easy, given you commit time to learning it. I strayed away for so long until I watched the MIT lecture series on algorithms and it all just clicked. The best feeling was was seeing the math on the chalk board for how you determine the complexity of operations on various graph layouts and just getting it. I struggled in high school math and rarely got that feeling in class. It was just one of those, "holy crap... It's all just an array and how we organize the data in that array that gives various benefits and drawbacks!" Incredibly empowering. Edit: This is the series I watched: https://www.youtube.com/watch?v=HtSuA80QTyo&index=1&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb https://www.youtube.com/watch?v=HtSuA80QTyo&index=1&list=PLU...
- code777777 10y agoWould you please share the link to the MIT lecture series? It may help the rest of us too. Thanks!
- Waterluvian 10y agohttps://www.youtube.com/watch?v=HtSuA80QTyo&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb https://www.youtube.com/watch?v=HtSuA80QTyo&list=PLUl4u3cNGP... I used YouTube to slow down and speed up the videos as necessary. Watched some parts a few times. Had a notepad out.
- sn9 10y agoCoursera also has two great sets of Algorithms courses: one on analysis and one on implementation (the latter by Sedgewick). Self-taught programmers really have an embarrassment of riches these days.