This paper presents a memory-efficient approach to frequent pattern mining using a transposed database format with an improved apriori algorithm for better performance in mining frequent patterns from large binary datasets. Utilizing dynamic programming techniques, the proposed method focuses on finding the longest common subsequence for faster data access and reduced space complexity. The results indicate that the new algorithm enhances efficiency compared to traditional approaches, especially for extensive datasets.