The challenge about returning the index of the provided number if it exists in the provided array, in case it isn’t exist we will retrun a value of -1
Time flexability and space flexibality
append(value) time => O(n) space => O(1)
insertBefore(value, newVal) time => O(n) space => O(n)
insertBefore(value, newVal) time => O(n) space => O(n)
I have structured a way to check the before and after value to insert a new values