<prompt> Kujenga algorithm kulinganisha orodha mbili na kupata vipengele vyote sawa.orodha1 1, 2, 3, 4 orodha2 2, 5, 4, 6  <response>: Algorithm:1. Initialize an empty list called similar_elements to store the resulting list of similar elements.2. Iterate through every element in list1 using a loop3. Compare the current element from list1 with each element of list2 using another loop4. If the current element from list1 is equal to the current element from list2, then it is a similar element5. Append this element to the similar_elements list6. Repeat the process until all the elements in the lists are compared7. Return the list of similar elementsCode implementation:def compare_listslist1, list2: similar_elements for i in list1: for j in list2: if i j: similar_elements.appendi return similar_elementsTesting the algorithmlist1 1, 2, 3, 4 list2 2, 5, 4, 6result compare_listslist1, list2printresult 