PROBLEM LINK:Div1, Div2
Author: Praveen Dhinwa
Tester: Triveni Mahatha
Editorialist: Adarsh Kumar
PROBLEM:You are given two array's $L$ and $G$ of $N$ integers. You need to check if $L* \le G*$ for all $1 \le i \le N$. You need to repeat this task after reversing $G$ too.
EXPLANATION:This problem is really simple. You just need to implement whatever the problem states.
For chef to wear the glove in “front” position, check if L* \le G* for all 1 \le i \le N. This can be done using a linear traversal of both the array. Similarly, for chef to wear the glove in “back” position just reverse the array G and check if L* \le G* for all 1 \le i \le N.
Now you just need to output “front”, “back”, “both”, or “none” depending upon the conditions fulfilled.