Detection of leakages in pipelines is a matter of continuous research because of the basic importance for a waterworks system is finding the point of the pipeline where a leak is located and − in some cases − a nature of the leak. There are specific difficulties in finding leaks by using spectral analysis techniques like FFT (Fast Fourier Transform), STFT (Short Term Fourier Transform), etc. These difficulties arise especially in complicated pipeline configurations, e.g. a zigzag one. This research focuses on the results of a new algorithm based on FFT and comparing them with a developed STFT technique. Even if other techniques are used, they are costly and difficult to be managed. Moreover, a constraint in the leak detection is the pipeline diameter because it influences accuracy of the adopted algorithm. FFT and STFT are not fully adequate for complex configurations dealt with in this paper, since they produce ill-posed problems with an increasing uncertainty. Therefore, an improved Tikhonov technique has been implemented to reinforce FFT and STFT for complex configurations of pipelines. Hence, the proposed algorithm overcomes the aforementioned difficulties due to applying a linear algebraic approach.