def count_pairs_with_sum(arr, target_sum): count = 0 seen = set()

Given a linked list, find the middle element.

print(find_middle_element(head)) # Output: 3

Given a string, find the first non-repeating character in it.