The detection of leaks in time series flow systems is crucial for efficient and integrated industrial processes. This is especially true when daily demand patterns differ, as this results in fluctuations in the snapshots of water consumption that are commonly used as the basis for placing sensors to detect leaks. This paper introduces a novel method in which the genetic algorithm (GA) is applied to find optimal sensor locations and to enhance the accuracy of leak detection in time series flow data. The method consists of two steps. Firstly, the GA is used to identify the optimal sensor locations using a specific fitness function that accounts for flow patterns, system topology, and leak characteristics. The novelty of the proposed method lies in the weighting scheme of the fitness function, which takes into consideration the frequency of events and the magnitude of leaks at potential locations. Secondly, the selected sensor locations are integrated with an advanced time series data analysis to locate leaks. In this technique, the most consistently performing locations are dynamically selected over time, allowing the model to adapt to varying conditions to maintain optimal sensor placement. Experiments were conducted on a simulated time series flow system with known leak scenarios to evaluate the performance of the proposed method. The results demonstrated the superiority of our GA-based sensor placement strategy in terms of leak detection accuracy and efficiency compared to other methods.•We developed a model called GA-Sense for sensor placement strategy by considering flow patterns to maximize leak detection and localization capabilities.•GA-Sense uses time series data to find strategic sensor locations to identify abnormal flow patterns indicative of leaks.•This approach enhances the accuracy and efficiency of leak detection and localization compared to alternative methods.