Programming Assignment
Programming Assignment
An algorithm is a method of solving a problem step by step. It is widely used to store, measure
and other similar computer and mathematical operations for data processing.
Ex: Of using sequential search algorithm: Write the implementation function
1. Enter an integer sequence with n numbers (1 <n <100).
2. Print the entered range
3. Find the value of x in the sequence of numbers (x entered from the keyboard)
4. Count the number of occurrences of y (entered from the keyboard)
5. Calculate the percentage value of numbers> = 5.
6. Print out the locations where the prime numbers appear in the sequence.
In constructing the algorithm, this is the first step. And you need to use algorithmic design tactics
to complete this step. Of which 5 legislative delegates will be present:
● Greedy Method
● Dynamic Programming
● Back Tracking
In the construction of the Algorithm, these representations all play an significant part. So don't
neglect any one representation when creating the Algorithm. Instead, to make development of the
Algorithm simpler and more effective, it must comply with the specifications.
Check the Algorithm:
The next step, once evaluated and illustrated, is to verify its validity. Through injecting the
algorithm into a computer, the evaluation will be completed. To do the test, then give it a bunch
of inputs. Value, if the algorithm promises that it operates correctly in any programming
language. Then you need to start again if the test algorithm fails. In particular, to avoid missing
any errors, it is important to review the representative wall information.
Algorithm validation is followed after the test stage algorithm has been completed. Algorithm
assessment must be based on several different parameters. As the algorithm runs, these criteria
are determined. This evaluation would not be practicable if the algorithm is not running. The
Algorithm evaluation criteria include: execution time and usage of memory.
● Execution time: This is the CPU's operating time. It is satisfactory if the algorithm is rapidly
processed by the CPU. If the code cannot be interpreted by the CPU, so the program fails.
● Usage of memory: Test the algorithm's memory performance. It will be used if the algorithm
can be processed quickly.
This phase is nearly completed. Checking the algorithm verifies the consistency of the algorithm
once again. The Algorithm test program is divided into 2 main stages. Including debugging and
profiling.
● Profiling (The method of program execution is based on a reference data set for debugging): In
profiling, however, one can only calculate time and memory power. From there, a decision
would be reached as to whether or not the Algorithm evaluation succeeded.
- The algorithm has been finalized after going through all the above steps. No mistakes, the
implementation feature of the program is consistency. Then continue to restore if any points have
not been reached. It is possible to bring the algorithm into application after everything has been
carefully checked. The construction of the algorithm is then complete.