Bloomberg Interview Question

Phone: remove duplicated words from a string. Onsite: 1) how to avoid dead-lock for multithread programming. 2)How to get max profit during stock transaction. 3) Overriding operator for complex number calculating (C++).