Блог пользователя Rogue_Ronin

Автор Rogue_Ronin, история, 21 месяц назад, По-английски

I saw this problem in an OA recently, and I've got no clue yet....

Question: Given an array A, for each subarray of A, calculate the sum of all the elements that are not the maximum or the minimum of that subarray.

Example: A = [1,2,3,4], answer would be 5 {for subarrays [1,2,3] and [2,3,4]}.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -5
  • Проголосовать: не нравится