Demandbase

Interview Questions for Demandbase

1. Given a sorted array that has been rotated some number of times, and a target value, find the index of the target value in the array. If the target value is not found, return -1. Implement binary search to solve this problem efficiently.

2. Public vs private company

3. Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

4. Data analytics using excel

5. You are given a map in form of a binary matrix where 1 represents land and 0 represents water. An island is a group of 1s (land) connected 4-directionally (horizontal or vertical). You may change one 0 to 1 to form a single island that can be considered the largest. What is the size of the largest island you can get?