Microsoft interview question

1. Implement read-write lock 2. Revert a binary tree