##
Find minimum sum such that one of every three consecutive elements is taken
September 25, 2016

Given an array of n non-negative numbers, the task is to find the minimum sum of elements (picked from the array) such that at least one element is picked out of every 3 consecutive elements in the array. Examples: Input : arr[] = {1, 2, 3} Output : 1 Input : arr[] = {1, 2,… Read More »