1. What is the online algorithm
Online method is the edge input side processing does not necessarily have to wait until after the completion of all inputs are given answers.
II. What is off-line algorithm
In the beginning of the problem it is necessary to know all the data before output.