## Recent Interview Questions

More Questions »- 1of 1 vote
Given an array and threshold value. The threshold represents the maximum length of subarrays that may be created. Each subarray created has a cost equal to the maximum integer within the subarray. Partition the entire array into subarrays no longer than the threshold and do it at minimum cost. The subarrays are to be chosen from contiguous elements and the given array must remain in its original order. Write a function to return an integer that denotes the minimum cost to partition the array.

For more clarification, here are the test cases.

1. Array: [1,2], threshold: 1.

we divide the array to {(1),(2)} Total cost is 1+2 = 3

2. Array: [1,5,2], threshold: 2.

we divide the array to {(1),(5),(2)} with total cost 1+5+2 = 8. OR

we divide to {(1,5),(2)} with total cost 5+2 = 7 OR

we divide to {(1),(5,2)} with total cost 1+5 = 6.

Of these minimum total cost is 6. So the ans is 6 with subarrays as {(1),(5,2)}

- 0of 0 votes
Given a bench with n seats and few people sitting, tell the seat number each time when a new person goes to sit on the bench such that his distance from others is maximum?

- -1of 1 vote
$$+91-9828791904$$ Wazifa for boyfriend love problem solution dua||wazifa||amal~~

- 0of 0 votes
A company wants to fly in a total of 100 candidates for the interview. The company has two office location, one in NY and other in SF and max capacity at each location is 50 candidates. You are given the cost it incurs to fly in each candidate to NY and SF.

`[500, 300],[540, 600],[550, 600],[300, 50]..so on`

Write an algorithm for the minimum total cost?

- 0of 0 votes
Given 3 unsorted arrays A, B and C you need to find all possible combinations such that A[i] + B[j] = B[k] + C[l].