I want to check whether the sum of two list is same or not.
lst1 = [1, 2, 3, 4]
lst2 = [0, 3, 3, 4]
if sum(lst1) == sum(lst2):
return true
Here the sum returns true. If I hash the list I get different values but hashing is computationally expensive. I only want to check whether the elements in the two lists are same (only with the exception of 1 element). I am using Binary search technique of dividing the list and then checking the hash. if hashes are different I am checking if its more than once. But as I said hashing is computationally expensive. Also the order does matter here. Thank you