If the access time of a symbol table can be made logarithmic
If the access time of a symbol table can be made logarithmic, it greatly reduces the search time. This can be implemented by
If the access time of a symbol table can be made logarithmic, it greatly reduces the search time. This can be implemented by
The following graph is reduced to its minimum spanning tree using prim's method. Indicate the sequence in which the nodes get included
Given the set of keys ( 40, 80, 35, 90, 45, 50, 70 ), which of the following represents a heap ? ( Each pair of parentheses indicate nodes at one level, left child first)
Match the methodology of List-A with the application of List-B :
Nithin K ? Dec 7 '2016 at 21:43
Answer : a->III b->I c->IV d->II
Explanation:
A “greedy algorithm” is optimization problem is one in which you want to find, not just a solution, but the best solution
Example: Finding MST using Kruskal’s algorithm (min-weight spanning tree)
A DFS algorithm is used to find strongly connected component.
A dynamic programming algorithm remembers past results and uses them to find new results example:Floyd–Warshall algorithm (All Pair Shortest path algorithm)
A divide and conquer algorithm consists of two parts:
Divide the problem into smaller subproblems of the same type, and solve these subproblems recursively
Combine the solutions to the subproblems into a solution to the original problem
Example: quicksort
Given two problems X and Y, Y is NP complete and X reduces to Y in polynomial time. Which of the following is a valid statement ?
Nithin K ? Dec 7 '2016 at 21:38
Answer : X is NP complete
Explanation:
A decision problem C is NP-complete if:
i.) C is in NP, and
ii.) Every problem in NP is reducible to C in polynomial time.C can be shown to be in NP by demonstrating that a candidate solution to C can be verified in polynomial time.
Note that a problem satisfying condition 2 is said to be NP-hard, whether or not it satisfies condition 1.
Reference:https://en.wikipedia.org/wiki/NP-completeness