PROBLEM LINK:
Author: Omkar Prabhu
Tester: Omkar Prabhu
Editorialist: Omkar Prabhu
DIFFICULTY:
EASY
PROBLEM:
You have to find if in-order sum(starting from index 1 to N) at any moment, is greater than or equal to K or not.
EXPLANATION:
Given an array A[N] and K, start your sum from A[1] till A[N].
If sum exceeds or is equal to K, print YES.
If sum after adding all elements or while adding each never exceeds or is equal to K, print NO.
AUTHOR’S AND TESTER’S SOLUTIONS:
Solution: http://ideone.com/hw0agC