Advanced Algorithms Flashcards
What is an algorithm?
(Informally) Any well-defined computational procedure that takes a set of values as input and produces a set of values as output.
An algorithm is a sequence of computational steps that transforms the input into the output.
What are the 4 basic data structures?
Arrays - Fixed size and contiguous (in a sequence) in memory
Multi-dimensional arrays -
Lists - A dynamic array
Strings - One dimensional arrays of characters ended by a null character
What is Big O?
What are the examples of Big O?
What is the difference between arrays, strings and lists?
How to choose a sort algorithm?
These are the different factors that determines what sorting algorithm you use:
-Size of the data set
-Degree of order
-The distribution of the data set
-The amount of information associated with each data item
What are the advantages and disadvantages of bubble, selection, merge and quick sorts?
What is the difference between divide and conquer and dynamic programming?
What is the difference AVL and Red-black trees?
Why do we need heaps and treaps?
Where do we use B-trees?
What are tuples?
What are sets?
What are dictionaries?
What are the features of stacks and queues?