Task 1 – Odd-occurrence string: Write a function that, given an integer N (1..200 000), returns a length-N lowercase string in which every letter that appears occurs an odd number of times.
Task 2 – Min-swap closest numbers: Write a function solution(string S, string T) that, given two digit strings S and T of equal length N (1..100 000) with no leading zeros, returns the minimum number of position-wise digit swaps needed to minimize |int(S) – int(T)|.
Task 3 – Patient slot assignment: Write a function solution(int[] A, int[] B, int S) that, given two arrays A and B of length N (1..100 000) containing preferred doctor-appointment slots (1..S, where S ≤ 100 000) for each patient, returns true if all patients can be assigned one of their two preferred slots with no slot shared by more than one patient, otherwise false.