Problem 8 solved correctly.
Problem 10 solved.
Problem 11 solved (binary search).
Problem 12 solved.