Chapter 4 Decrease and Conquer Flashcards
What is Topological Sorting
Outline an algorithm to print a topological sort of a digraph or detect that the graph has a cycle. What will be the time and space complexity of your algorithm?
Consider the partition problem: Given n positive integers, partition them into
two disjoint subsets with the same sum of their elements. (Of course, the problem may not have a solution.) Design an exhaustive-search algorithm for this problem. You do not have to write pseudocode
Discuss Khans Algorithm
Write pseudocode for the insertion sort algorithm. Also, discuss the time compleixty.
write pseudocode for recursive binary search tree algorithm. Discuss the time complexity
write an algorithm to compute the product of two integers (russian peasant multiplication). Discuss the time complexity.
write psuedocodee for euclids algorithm. Discuss the time complexity
write pseudocode to find the kth smallest element in a kist of n numbers. Discuss the time complexity.
write pseudocode for Lomutos partitioning algorithm. Disucss the time complexity
write pseudocode for the quickselct algorithm. Discuss the time complexity.