Image Overlap

Solution Code

Time Complexity

O(N^4)

Space Complexity

O(N^2)