Sunteți pe pagina 1din 2

Quiz# 01

Question 1: Which of the following procedure can be


recognized as algorithm.

Answer:
Program that determine average of numbers can be recognized as
algorithm.

Question 2: What are the primitives characteristics for


procedure to be recognized as algorithm.

Answer:
A procedure must contain following characteristics:

It must take one or more inputs.


It must have to return at least one output.
It must consist of finite step.

Question 3: What are hard problems?

Answer:
There are some classic problems in computer word for which no
efficient algorithm is known. Such problems are known as hard problems. For
example, Hamiltonian problem.

Question 4: Difference between linear and nonlinear


algorithms.

Answer:
Linear Algorithms: A search algorithm is said to be linear if it
searches the required item sequencely. For example, searching in an array.
Non-Linear: A search algorithm is said to be non-linear if it searches
randomly for required item. For example, searching in a binary tree.

S-ar putea să vă placă și