1. Implement a max() function that returns the maximum of all elements in the stack with optimized time and space complexity.
2. Given an array, remove all duplicates in place.
3. Using a NoSQL document schema, design a document store schema to store bike model data.
4. Are you willing to commute to work by train?
5. How would you implement two stacks using a single array?