data structures and algorithm (1)
data structures and algorithm (1)
1. Input-Output:- Algorithm takes '0' or more input and produces the required
output.
4. Define flowchart?
Step 1: Start
Step 4: If a>b
If a>c
If bc
Step 5: Stop
6. Write an algorithm to find the Simple Interest for given Time and
Rate of Interest?
Step 1: Start
Step 4: Print S
Step 5: Stop
Steps:
1.Start
4. Else
6. Display “Odd”.
7. Stop.
1.Traversing- It is used to access each data item exactly once so that it can
be processed.
2. Searching it is used to find out the location of the data item if it exists in
the given collection of data items.
3.Inserting- It is used to add a new data item in the given collection of data
items. 4. 4.Deleting-It is used to delete an existing data item from the given
collection of data items.
5.Sorting- It is used to arrange the data items in some order i.e. in ascending
or descending order in case of numerical data and in dictionary order in case
of alphanumeric data.
6.Merging-It is used to combine the data items of two sorted files into single
file in the sorted form.