LeetCode: max subarray, n queens, pow