For Highest use the following pseudocode for the logic:
Set a local variable named curHighest to the first item of the Items Array
For each Item in Items
If Item.cost > curHighest.cost
Set curHighest to Item
Return curHighest
For Lowest use the following pseudocode for the logic:
Set a local variable named curLowest to the first item of the Items Array
For each Item in Items
If Item.cost < curLowest.cost
Set curLowest to Item
Return curLowest
How to put in unreal engine for code