Video rankings. The InstaVid social network collects user preferences by ask- ing them to rank their favorite videos. One of the features of InstaVid is offering friendship suggestions for users with similar tastes, using the following metric. If user One ranks the videos using the sequence 1,2 same videos using the sequence v1, v2, , Vn of numbers 1,2,... , Video rankings. The InstaVid social network collects user preferences by ask- ing them to rank their favorite videos. One of the features of InstaVid is offering friendship suggestions for users with similar tastes, using the following metric. If user One ranks the videos using the sequence 1,2 same videos using the sequence v1, v2, , Vn of numbers 1,2,... , n, then their social distance is computed by counting all pairs (vi, vj) from the ranking of Two that satisfy the condition vi 〉 Uj for i 〈 j. For example, if the user One ranks four videos as 1,2,3,4 and Two ranks them as 3, 1,2, 4 then their social distance is 2 because of the pairs (3, 1) and (3,2) in the rankings of Two , . . . ,n, and user Two ranks (i) Design an algorithm social_distance (prefa, prefb) with time complexity in Θ(n2) that computes the social distance for users with video rankings prefa and prefb. Please write your solution in the form of a Python function. Justify the run timne of vour code. (ii) Improve your algorithm using divide and conquer approach. Fully analyse your algorithm; you may use the Master Theorem. Write your solution in the form of a Python function. (You may also write pseudocode if desired; we will not run your code anyway, but t is aceptable to actually implement your code in Python and copy it in your soluton.)