Market contains index of all stocks. QuickSortStocks can take in list of stocks instead of positions.