Based on layered spanning trees and associated inference algorithms, this article proposes a novel topological mapping approach handling multiple hypotheses, which significantly improves its computational efficiency with merely linear time cost. To facilitate this work, two spanning trees first establish a storage separation of map nodes and map edges. The correspondence between specific nodes and edges, as well as their inheritance, is then organized with intelligent pointers. On this basis, when a new observation is available, the robot will first evaluate loop closure by searching possible matches in the spanning tree of map nodes, which inherently relate to divergent understandings of historical observations. After the evaluation, related hypotheses are re-inferred based on a Bayes-based recursive inference method, and the spanning tree of map edges is updated accordingly. The correctness of hypotheses is sorted probabilistically, and the hypothetical map with the highest probability can be chosen to reconstruct combinatorially with corresponding nodes and edges in the layered spanning trees. To verify the proposed mapping approach, an automated simulation environment is developed modularly for large-scale scenarios, based on the robot operation system. Stress tests are finally carried out with both simulations and experiments, and the results demonstrate that the proposed approach is highly efficient, robust, and scalable. In particular, it effectively reduces the computation, as well as memory consumption, with linear complexity, regarding commonly reported exponential complexity in accumulated works.