Using the visibility graph algorithm (VGA), a complex network can be associated with a time series, such that the properties of the time series can be obtained by studying those of the network. Any value of the time series becomes a node of the network, and the number of other nodes that it is connected to can be quantified. The degree of connectivity of a node is positively correlated with its magnitude. The slope of the regression line is denoted by k-M, and, in this work, this parameter was calculated for the cardiac interbeat time series of different contrasting groups, namely: young vs. elderly; healthy subjects vs. patients with congestive heart failure (CHF); young subjects and adults at rest vs. exercising young subjects and adults; and, finally, sedentary young subjects and adults vs. active young subjects and adults. In addition, other network parameters, including the average degree and the average path length, of these time series networks were also analyzed. Significant differences were observed in the k-M parameter, average degree, and average path length for all analyzed groups. This methodology based on the analysis of the three mentioned parameters of complex networks has the advantage that such parameters are very easy to calculate, and it is useful to classify heartbeat time series of subjects with CHF vs. healthy subjects, and also for young vs. elderly subjects and sedentary vs. active subjects.