Sharp bounds for the intersection of nodal lines with certain curves