Algorithms Flashcards
What is NP HARD and NP complete
NP complete will not be solved in polynominal time and there is no current solution example of this is TRAVELLING SALESMAN
What is exhaustive search
Testing each possibility sequentially this is done in both NP hard and NP complete
What is polynomiaml time
This is a reasonable amount of time
What is faster oLogn or O(n)
O(LOGn)
What is faster O(n^2) or O(2n)
O(2n)
What is asymptotic notation
This is the notation that will allow us to measure the running time of an algorithm as the input increase
What is binary search
This is a search method that will break an array in half each time when looking for a key value the array that is presented must be in order.
This has a running time of O(LogN)
What is quick sort
This uses the pivoting algorithm that will split the arrays and sort them then place them back together
What is the fastest sorting and searching algorithm
Binary Search and Radix Sort
What is the time for bubble sort
O(n^2)
What is the time for binary search
O(logn)
What is the time for linear search
O(n)
what is LIFO and where is it used
STACKS
What is FIFO and where is it used
QUEUES
What is a hash table and where is it used ?
This is used to identify objects that are similar that are grouped toghether but need to be uniquley identified