## Recent Interview Questions

More Questions »- 0of 0 votes
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].

You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You can begin the journey with an empty tank at one of the gas stations.

Return ALL the starting gas station's index where you can travel around the circuit once

public List<Integer> canCompleteCircuit(int[] gas, int[] cost) {

}

- 0of 0 votes
Implement power function. The function should take two numbers as input (e.g. 2,3) and return 8 as output

See link below for hints and answer https://baquerrizvinotes.blogspot.in/2017/05/how-to-crack-amazoncom-technical.html

- 1of 1 vote
You have a array with integers:

`[ 1, -2, 0, 6, 2, -4, 6, 6 ]`

You need to write a function which will evenly return indexes of a max value in the array.

In the example below max value is 6, and its positions are 3, 6 and 7. So each run function should return random index from the set.

Try to implement with O(n) for computation and memory.

Try to reduce memory complexity to O(1).

- 0of 0 votes
You have a binary tree which consists of 0 or 1 in the way, that each node value is a LOGICAL AND between its children:

`0 / \ 0 1 / \ / \ 0 1 1 1`

You need to write a code, which will invert given LEAF and put tree in a correct state.

- 0of 0 votes
Given n1, n2 is the number after removing one digit from n1. Example, n1 = 123, then n2 can be 12, 13 or 23.

If we know the sum of n1 + n2, and find the possible values of n1 and n2.

public List<List<Integer>> getNumber(int sum){

}