This is a pretty limited list of algorithms. It should definitely include linear time sorting algorithms (e.g. bucket or radix sort), as well as graph algorithms (shortest path at least, but also probably all pair shortest path and minimum spanning tree). There should also be a section about heaps and their operations. There are a huge number of ways to implement a heap (e.g. linked list, binary tree, or a more exoti…
Big-O Algorithm Complexity Cheat Sheet
11–20 of 136 posts
Re: Big-O Algorithm Complexity Cheat Sheet
#12Slightly academic, but this cheat sheet gives out some shorthand explanations to many of the methods in the Big-O document: http://www.scribd.com/doc/39557873/Data-Structures-Cheat-She...
Re: Big-O Algorithm Complexity Cheat Sheet
#13You can pass some interviews by blindly memorizing, but it's unnecessary. If you understand a concept, then you can reason its big O. Memorization implies a superficial understanding that may be revealed later. If you don't understand something, spend a few hours and implement it. "I hear and I forget. I see and I remember. I do and I understand." - Confucious
Re: Big-O Algorithm Complexity Cheat Sheet
#14Re: Big-O Algorithm Complexity Cheat Sheet
#15Re: Big-O Algorithm Complexity Cheat Sheet
#16Slightly academic, but this cheat sheet gives out some shorthand explanations to many of the methods in the Big-O document: http://www.scribd.com/doc/39557873/Data-Structures-Cheat-She...
>To download or read the full version of this document you must become a Premium Reader.
Re: Big-O Algorithm Complexity Cheat Sheet
#17This is why it's a terrible idea to ask for some random algorithm runtime in an interview. It says absolutely nothing about programming or reasoning skill. I'd rather ask a candidate to explain their favorite data structure to me and derive it's big-O complexity right then and there. Being able to regurgitate the correct answer doesn't count for anything in my book.
It is good to know what you should know about though.
Re: Big-O Algorithm Complexity Cheat Sheet
#18Re: Big-O Algorithm Complexity Cheat Sheet
#19This is very shallow and of limited use.
Re: Big-O Algorithm Complexity Cheat Sheet
#20I don't know why people don't use balanced BST ( std::map in c++) for storing the adjacency lists of a graph. Sure the insertion would take O(log n) time but , I think the overall benefit would be greater than the costs. Correct me if I am wrong.