You are on page 1of 5

Chapter 1

1. Define algorithm? What are its properties?



The process of solving a problem based on a defined standard roles
and steps through any programming language is called algorithm.
Properties
a. Input.
b. Output.
c. Definiteness.
d. Effectiveness.
e. Termination.

2. What is debugging and what is profiling?

Debugging is the process of executing a program to check the result
as desired.
Profiling is the process of executing a program with different data
values to test the performance, time and space it takes to give the
desired result.

3. What is pseudo code? Give an example.

Pseudo code is a detailed yet readable description of what an must
do, or it is a process of describing a problem rather than in a
programming language.
Example:
Ifelse, while, for.

4. How did you validate the algorithm?

We can validate the algorithm by converting it into program through
code.
5. What is problem solving? Illustrate the different aspect in it?

The process of fracturing the problem into many small parts, thereby
find the solution of every problem from the root level.
Different aspects:
The first is the problem definition phase, where it is the concept or
information gathering stage
Second step is to start on a problem. This is the phase where block
may often occur. In this phase, we need to develop the ability to view
a problem from variety of angles.

6. What are general steps in solving a problem?
The foremost steps towards solving a problem is to understand the
core concept of the problem and try to figure out what must me be
done rather than how to do it.
Secondly, is how to start it with the problem, hence there might be
many circumstances the confuses our mind, and what to do, what
will be the best, how can I get the solution, but we should
understand with what independent solution we are implementing,
and try to work out with the mechanism, that will allow us to solve
the problem.

7. Name the important problem types?


8. How to devise an algorithm. Explain?
In order to devise an algorithm, we must have to be familiar with the
problem domain and computer domain.
We must need to have to details of the problem from the root level,
how it is giving the problem, and try to find out what to do the first.
Thereafter, devise an algorithm sequentially, based on every step of
the problem and then at last it will be convert it to programming
code and execute the solution.

Chapter 2
1. Give at least 5 examples where we use stack operations?
Bangles, shirts, ;;;;;;;;;;;;;;;;;

2. Give at least 5 examples where queue is used?
Printer, software unstallation,

3. Name 10 situations that can be represented by means of graphs.
Explain what each vertex and edges represent?
Every graph consists of set of objects which is called vertices and
edges. The line which connects two given points are said to be
called vertices.
The distances between two points are said to be edges.
4.
5.
6.
7.
8. What is linked list? Explain singly linked list with pictorial
representation.
Linked list is the representation of data structure in a collection of
nodes, where each node is a collection of fields such as data items
and links, which hold the information of the node and the address
of the neighboring nodes.

9. List the general operations on linked lists?
a. Creation of a linked list.
b. Displaying the contents of a linked list.
c. Inserting an element at the front or at the rear end of a linked
list.
d. Inserting an element at the specified position of a linked list.
e. Inserting an element in to a sorted linked list.
f. Deleting an element from a linked list at the front or at the
rear end.
g. Deleting an element from a linked list at the specified position.
h. Deleting an element e from a linked list if present.
i. Searching for an element e in the linked list.
j. Reversing a linked list.
k. Concatenation of two linked lists.
l. Merging of two ordered linked lists.
m. Merging of two ordered linked lists.
n. Splitting a linked list.

10. Explain queue operation?
Create () Q
Insertion (Q, e)
Deletion (Q)
Is full (Q)
Is empty (Q)
Front (Q)
Back (Q)
Destroy (Q)

Chapter 3
1. Design and develop an algorithm for multiplying n integer?

You might also like