← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given an array of integers and a target integer. Your task is to compare how many numbers in the array are strictly greater than the target and how many are strictly less than the target. After counting, return the string "greater" if more elements are greater than the target, "less" if more are less than the target, or "equal" if the two counts are the same. Elements that are equal to the target are ignored and do not contribute to either count.