Learning about complexity/timing for algorithms worth it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Learning about complexity/timing for algorithms worth it?

I’ve been learning C. I have an ok grasp up to data structures. I still am figuring out pointers, LLs, etc as well. I have begun to move forward and branch into other areas as well. Data structures and cryptography seem to be my big end goal atm. I am interested in embedded C for electronics. Atm I have been watching and taking notes from MIT 6.006 on YouTube, which is about algorithm complexity. It seems to help to know the complexity with data structures. Just want to verify I am on the right path.

4th Oct 2018, 3:46 PM
Ryan
Ryan - avatar
4 Answers
+ 1
yes, for huge amounts of data, its EXTREMELY important to learn about time complexity, even though I dont use big data, I can definitely see the difference between a bubblesort O(n2) that takes over 2 hours to sort a 60*60 pixel field (10 per second) and a radixsort(kn) that takes 18 minutes to do the same
4th Oct 2018, 8:28 PM
~Just Another Brick In The Wall~
~Just Another Brick In The Wall~ - avatar
+ 1
yes, big O notation is indeed the same as time complexity btw n2 is almost the worst sort of all since it takes (input*input) to sort everything n is very fast, since it only has to loop through the input once kn is a bit slower and its worst case is slower than n2, but only if the length of the biggest inputinde is larger than the input n2 = inputlength * inputlength kn stands for indexlength (abc = 3) * inputlength and there are this kind of sorting algorithms that don't compare at all (forgot how they were called)
4th Oct 2018, 9:27 PM
~Just Another Brick In The Wall~
~Just Another Brick In The Wall~ - avatar
0
cool. Thanks for the answer. I just want to make sure I’m not over doing it atm. I’m guessing I can find supplemental things with searching for Big O notation? I am unsure if that is the same as time complexity.
4th Oct 2018, 9:12 PM
Ryan
Ryan - avatar
0
cool thanks for the info. I took Calc 1 in college so I understand the idea behind them a bit due to limits but I struggled with logarithmic equations. I actually had to look up why n^2 was worse then nlogn and stackoverflow had a very good post on it. https://stackoverflow.com/questions/23329234/which-is-better-on-log-n-or-on2 Thanks again for all the info. I really appreciate it.
5th Oct 2018, 1:51 AM
Ryan
Ryan - avatar