Hyper-redundant manipulators are produced by cascading several mechanisms on top of each other as modules. The discrete actuation makes their control easier because discrete actuators usually do not need any feedback to control. So far, several methods have been proposed to solve the inverse kinematic problem of discretely actuated, hyper-redundant manipulators. The two-by-two searching method is better than the other methods in terms of CPU time and error. In this article, the mentioned method is generalized by choosing an arbitrary number of modules as pending modules in each step of the solution instead of the necessary two. For validation, the proposed method is compared with nine meta-heuristic searching algorithms: simulated annealing, genetic algorithm, particle swarm optimization, ant colony optimization, gray wolf optimizer, stochastic fractal search, whale optimization algorithm, Giza pyramid construction, and flying fox optimization. Furthermore, the effect of the number of pending modules on CPU time and error is investigated. All the numerical problems have been solved for two case studies, one is planar and the other is spatial.