Written Test: write code
1. Given array of stock prizes find the Max profit obtained by buying n selling any times?
Ex:{100,190,210,30,50,20,90,100}
Buy at 100 and sell at 210 & again buy at 30 and sell at 50 and ...
Max Profit={(210-100) + (50-30) + (100-20)}
2. Reverse Stack in place without using any extra variables or data structures
3. Validate given expression is valid or not
Eg: (a+b)*c is valid, ab+c is invalid
Technical Interview Questions:
Hashcode vs equals
Deadlocks implementation
Semaphores and mutex
How to prevent deadlocks
-> Find position of an element in a sorted array of infinite numbers
About my current company project