The algebraic structure, given by a null alignment of the Weyl tensor, of expanding Robinson-Trautman and non-expanding Kundt geometries is analyzed in an arbitrary dimension. Conditions for all possible algebraic types are identified in closed form.
Since the expansion parameter Θ is explicitly kept in all expressions, it can be simply set to zero to obtain results for the Kundt class. Usefulness of these general results obtained for all non-twisting and shear-free geometries in any metric theory of gravitation are demonstrated on specific vacuum solutions to the Einstein field equations.