Author: Omkar Prabhu
Tester: Omkar Prabhu
Editorialist: Omkar Prabhu
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.
Given an array A[N] and K, start your sum from A 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: