Online algorithm means getting output after processing at ith element for eg: median of a stream of elements, Whereas in case of online means using all n elements to arrive at an output.