Answer. An algorithm is a well-defined step by step procedure that describes how
to solve a problem. Algorithms are more precise than informal instructions and
do not require any insight to follow; they are still not precise enough for a
computer to follow in the form they are written, but are precise enough for a
human to know exactly what you mean, so they can then work out how to implement
your algorithm, either doing it themselves, or writing a computer program to do
it. The other important thing with this level of precision is that we can often
make a good estimate of how fast it will be.
An algorithm is a well-defined step by
step procedure that describes how to solve a problem. Algorithms are more
precise than informal instructions and do not require any insight to follow;
they are still not precise enough for a computer to follow in the form they are
written, but are precise enough for a human to know exactly what you mean, so
they can then work out how to implement your algorithm, either doing it
themselves, or writing a computer program to do it. The other important thing
with this level of precision is that we can often make a good estimate of how
fast it will be.
An algorithm importance in Java Programming : An algorithm
is defined by a finite set of steps that combined achieve the desired
goal.There is such a big importance of algorithms of use in java For example
data sorting,search, hashing,etc
Sorting
Sorting provides a good example of an
algorithm that is very frequently used by computer scientists. The simplest way
to sort a group of items is to start by removing the smallest item from the
group, and put it first. Then remove the next smallest, and put it next and so
on. Unfortunately, this algorithm is O(N2), meaning that the amount of time it
takes is proportional to the number of items squared. If you had to sort a
billion things, this algorithm would take around 1018 operations. To put this
in perspective, a desktop PC can do a little bit over 109 operations per
second, and would take years to finish sorting a billion things this way.
Search
Finding key data in sorted data sets. The
most common is the binary sort, but there are also depth, breadth and first
searches used by web applications;
Hashing
Similar to search but with an indexing
and key ID component. Hashing provides superior results because it assigns a
key to certain data.
0 comments:
Post a Comment