1. Implement a compression and decompression scheme that is based on Huffman coding.2. Design an efficient algorithm for the matrix chain multiplication problem that outputs a fully parenthesized...
Articles Posted by admin
1. Let three integer arrays, A, B, and C, be given, each of size n. Given an arbitrary integer k, design an O(n2 logn)-time algorithm to determine if there exist numbers, a in A, b in B, and c in C,...
Given a sequence S = (x0,x1,…,xn−1) of numbers, describe an O(n2)-time algorithm for finding a longest subsequence T = (xi0 ,xi1 ,…,xik−1 ) of numbers, such that ij j+1 and xij > xij+1 ....
1. Describe an example of a text T of length n and a pattern P of length m such that the brute-force pattern-matching algorithm achieves a running time that is Ω(nm).2. Adapt the brute-force...
A native Australian named Anatjari wishes to cross a desert carrying only a single water bottle. He has a map that marks all the watering holes along the way. Assuming he can walk k miles on one...
Recent Comments