1. Write a listbox-style binary search for an ordered array of integers. Listbox-style means that you should return the index of the first item greater than or equal to the item being searched for; if all items are less, you should return the index of the last item. You are guaranteed that there is at least one item in the array.
Перевод: Написать listbox-style бинарный поиск для упорядоченного массива целых чисел. Listbox-style значит что вы должны вернуть индекс первого элемента, который больше или равен значению, которое ищем. Если все элеменыт меньше, то вернуть индекс последнего элемента. Вам гарантируют что массив заполнен хотя бы одним значением.
2. Suppose you have an array of integers, both positive and negative, in no particular order. Find the largest possible sum of any continuous subarray. For example, if you have all positive numbers, the largest sum would be the sum of the whole array; if you have all negative numbers, the largest sum is 0 (the null subarray)
Перевод: Предположим, что у вас есть массив целых чисел, как положительных, так и отрицательных, в определенном порядке. Найдите максимально возможную сумму любого непрерывного подмассива. Для примера, если вы имеете все положительные числа наибольшая сумма будет сумма всего массива; если вы имеете все отрицательные числа наибольшая сумма ноль (нулевой подмассив).