(A) Not a solution
(B) An algorithm
(C) Good solution
(D) The best solution
Category: Fundamentals of Algorithms Mcqs
Fundamentals of Algorithms Mcqs for Screening tests, Interviews, Viva and Other competitive exams. Algorithms Mcqs section will help users to prepare mcqs of Computer Algorithms for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, System administrator and all other Exams can prepare their Algorithms portion from here.
The greedy part of the Huffman encoding algorithm is to first find two nodes with larger frequency?
(A) True
(B) False
(C) NA
(D) NA
The codeword assigned to characters by the Huffman algorithm have the property that no codeword is the postfix of any other?
(A) True
(B) False
(C) NA
(D) NA
Huffman algorithm uses a greedy approach to generate a postfix code T that minimizes the expected length B (T) of the encoded string?
(A) True
(B) False
(C) NA
(D) NA
Suppose we have three items as shown in the following table, and suppose the capacity of the knapsack is 50 i.e. W = 50. Item Value Weight 1 60 10 2 100 20 3 120 30 The optimal solution is to pick?
(A) Items 1 and 2
(B) Items 1 and 3
(C) Items 2 and 3
(D) None of these
The Knapsack problem belongs to the domain of __ problems.
(A) Optimization
(B) NP Complete
(C) Linear Solution
(D) Sorting
For Chain Matrix Multiplication we can not use divide and conquer approach because?
(A) We do not know the optimum k
(B) We use divide and conquer for sorting only
(C) We can easily perform it in linear time
(D) Size of data is not given
A p x q matrix A can be multiplied with a q x r matrix B. The result will be a p x r matrix C. There are (p . R) total entries in C and each takes __ to compute.
(A) O (q)
(B) O (1)
(C) O (n^2)
(D) O (n^3)