Bayesian network (BN) structure learning is a fundamental yet NP-hard problem in probabilistic graphical models. Dynamic programming methods, such as the algorithm proposed by Silander and Myllymaki (2012), guarantee global optimality but their practical use is limited by large memory requirements, repeated traversals of the subset lattice, and reliance on disk I/O. We propose a memory-efficient exact BN structure learning algorithm that integrates parent-set optimization and sink-node identification within a single, level-wise traversal. By retaining only the minimal information required at each level, our method eliminates disk usage and reduces peak memory complexity from \(O(p 2^p)\) to \(O(\sqrt{p}\,2^p)\) while preserving \(O(p^2 2^p)\) time complexity. Experiments show consistent improvements over the baseline dynamic program in both peak memory and runtime. Notably, without any disk support, we successfully learned a BN with 28 variables using only 16 GB of RAM. These results highlight the scalability and practical relevance of the proposed approach.