The most efficient code is not always best, your ability to maintain and read c…