there is nothing such as "unique code", if a problem is solved by a particular algorithm, the uniqueness is just a matter of avoiding coincidence in variable name selection, code formatting etc.
anyways, I can write the efficient code at my best for you in case you need help.
Note - Delivery time might differ based on complexity.
Thank you