I am using the algorithm package and I seem to have a lot of whitespace created when placing an algorithm.
\usepackage{algorithm}
\usepackage[ruled,vlined]{algorithm2e}
\begin{algorithm}[H]
\SetAlgoLined
\end{algorithm}
The whitespace occurs by the use of a H. If it can't fit on the previous page then whitespace is added between all paragraphs, making it look ridiculous.
I understand the H is must be here but when I change it to a h, it makes the entire document go to the left and fits text into about an inch!