Prep (18-19) Complete Questions And
Answers | 100% Solved | Updated
Asymptotic Analysis CORRECT ANSWERS How the run time of a program depends on
the size of the problem
Exact Analysis CORRECT ANSWERS Provides a more specific measure of algorithm
efficiency than asymptotic analysis.
Divide and Conquer Algorithm CORRECT ANSWERS An algorithm that solves a
problem recursively by splitting it into a fixed number of smaller non-overlapping
subproblems of the same type
Greedy Algorithm CORRECT ANSWERS An algorithm that follows problem solving
heuristic of making optimal choices at each stage.
Disadvantages of Greedy Algorithms CORRECT ANSWERS 1. Short sighted
2. Non-Recoverable
Backtracking Algorithm CORRECT ANSWERS A general algorithm for finding all (or
some) solutions to some computational problems, notably constraint satisfaction
problems, that incrementally builds candidates to the solutions, and abandons a
candidate ("backtracks") as soon as it determines that the candidate cannot possibly be
completed to a valid solution.
Branch and Bound Algorithm CORRECT ANSWERS Eliminates groups of trees from
consideration upon discovering that all their members are worse than the best tree
found so far
Sorting Algorithms CORRECT ANSWERS arrange items in a list in a particular order
Multiplication Algorithm CORRECT ANSWERS Performs the basic operations of single-
digit arithmetic.
Graph Searching Algorithm CORRECT ANSWERS Searches for the number of graph
edges and number of graph nodes.
Big Theta Notation CORRECT ANSWERS A method of classifying the time complexity
of algorithms according to realistic sets of bounding criteria that can be used to provide
the best and worst case scenarios.
, Quick Sort Algorithm CORRECT ANSWERS This uses a divide and conquer algorithm.
First the pivot value which is the first item in the list is selected. Then the remainder of
the list is divided into two partitions, the elements less than the pivot is in the first
partition and the greater elements in the second.
Advantages of quick sort CORRECT ANSWERS 1. Extremely Fast
2. No need for Additional Memory
Disadvantages of quick sort CORRECT ANSWERS 1. If the split point is nearer to the
start or end of the list, the division will be very uneven.
2. If the list is very large, and recursion continues too long, it may cause stack overflow
and the program will crash.
Merge Sort CORRECT ANSWERS A list is split into individual lists, these are then
combined (2 lists at a time).
Candidate Set CORRECT ANSWERS Contains the data used to devise a solution.
Selection function CORRECT ANSWERS Chooses the best candidate and adds it to
the solution.
Feasibility Function CORRECT ANSWERS Examines the candidate in order to
determine whether or not it can be used to solve the problem.
Objective Function CORRECT ANSWERS Gives a value to the solution.
Solutions function CORRECT ANSWERS Determines if the complete solution has been
found yet (returns a Boolean)
Greedy Choice Property CORRECT ANSWERS A solution can be constructed
incrementally without reference to future decisions, past decisions, or the set of possible
solutions to the problem.
Optimal Substructure Property CORRECT ANSWERS Present only if the optimal
solution in any current stage always eventually leads to the optimal global solution.
Variations of a Greedy Algorithm CORRECT ANSWERS 1. Pure Greedy Algorithm
2. Orthogonal Greedy Algorithm
3. Relaxed Greedy Algorithm
Examples of Greedy Algorithms CORRECT ANSWERS 1. Kruskal's Algorithm