Calculate sum of prime index values in an array

Company: Wipro_14nov

Difficulty: medium