What can be said about the subalgebras of the polynomial ring, with minimal or maximal Hilbert function? This question was discussed in a recent paper by M. Boij and A. Conca. In this paper we study the subalgebras generated in degree two with minimal Hilbert function. The problem to determine the generators of these algebras transfers into a combinatorial problem on counting maximal north-east lattice paths inside a shifted Ferrers diagram. We conjecture that the subalgebras generated in degree two with minimal Hilbert function are generated by an initial Lex or RevLex segment.