<prompt> Kujenga algorithm ambayo huondoa duplicates kutoka array fulani.arr 1, 2, 2, 3, 4, 4, 5  <response>: 1. initialize a new empty array called result2. loop through each element in the input array arr3. check if the current element is already in the result array4. if it is not, append it to the result array5. if it is, move to the next element6. after the loop, return the result arraypythondef remove_duplicatesarr: result Step 1 for element in arr: Step 2 if element not in result: Step 3 and 4 result.appendelement Step 5 return result Step 6Testing with the input:pythonarr 1, 2, 2, 3, 4, 4, 5printremove_duplicatesarr 1, 2, 3, 4, 5 