Algorithm and Data structure (Lecture # 3)
Continue....
6) Searching:
Searching
means finding of an element or location of an element in a data list or data
bubble.

Searching
is usually performed using unique key values
e.g; A
student registration number of his/her makes him/her unique one.

If
element to be searched found in the desired list then we say “search
successful” otherwise we say search is “Unsuccessful”

Most
popular search methods are:
o
Sequential
search/Linear search
o
Binary
search
7) Sorting:
Rearranging the elements of a data list or data bubble
Rearranging the elements of a data list or data bubble

The
Rearranging of ReOrdering can be in ascending order or descending order

Most
of the sorting techniques are designed by mathematical because actually sorting
is a mathematical task.

Then
these techniques are converted to proper computing algorithm by computer
scientists.

Some
popular sorting methods are direct/straight/selection sort.

Insertion
sort

Quick
sort

Bubble
sort

Marge
sort
etc.
etc.
8) Merging:
Combining two or more sub lists into a computer or major list
While merging there shouldn’t be any effect on total number of element
of both sublistCombining two or more sub lists into a computer or major list

9) Splitting:
Dividing a composite list into two or more sublist is called splitting
While splitting this shouldn’t be any effect on total numbers of elements from composite list
Dividing a composite list into two or more sublist is called splitting
While splitting this shouldn’t be any effect on total numbers of elements from composite list
10)Copying:
Getting a duplicate by means of copying elements of a list in newer list
e.g; for(i=0;i<=5;i++)
e.g; for(i=0;i<=5;i++)
A[1]+A[3]= 143
11) Counting:
Finding the total number of elements in a list is called counting.
for(i=0;i<=0;i++)
cout<<A[i];
cout<<x<<x++;
Finding the total number of elements in a list is called counting.
for(i=0;i<=0;i++)
cout<<A[i];
cout<<x<<x++;
Comments
Post a Comment