Just wondering, how can I bubble sort 2 corresponding array?
For example, I have an array of string called Items and array of float called price and these arrays are related to each other (i.e. items[0] relates to price[0]). I want to sort the item based on the price from lowest to highest and both arrays need to still be aligned to each other after the search
If you find yourself trying to maintain several parallel arrays, it's usually a sign that what you really want is a struct, or a class, which combines those things into a single type, e.g.