  We relate invariants of torus knots to the counts of a class of lattice
paths, which we call generalized Schr\"oder paths. We determine generating
functions of such paths, located in a region determined by a type of a torus
knot under consideration, and show that they encode colored HOMFLY-PT
polynomials of this knot. The generators of uncolored HOMFLY-PT homology
correspond to a basic set of such paths. Invoking the knots-quivers
correspondence, we express generating functions of such paths as quiver
generating series, and also relate them to quadruply-graded knot homology.
Furthermore, we determine corresponding A-polynomials, which provide algebraic
equations and recursion relations for generating functions of generalized
Schr\"oder paths. The lattice paths of our interest explicitly enumerate BPS
states associated to knots via brane constructions.
