This is the brute force solution of the problem with time complexity of O(n^2). We will have a part two as well where I will show other approaches.
No download links available.