I have two lists of numbers list A and list B
I want to map every number in list A to a number in list B. That number is the closest number that list A exceeds in list B.
So for example, if i have the number 5 in list A and there are the numbers 3 and 6 in list B, then I want the number 5 to map to 3.
I realize I could do this by taking the difference between each number in list A with each number in list B then indexing and such but my list A and list B are extremely long and was wondering if there was a more efficient way to go about this.
Thanks!