I have 2 arrays:
[2, 4, -2, 4, 1, 3] [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]
and I want them to be sorted by the numerical array:
I would recommend storing the entire thing in a Map. That way, you can independently sort the first array however you want and then use those values as keys to call respective value of second array.