همه کارتها
Bubble Sort Swap Count Equals Inversions
Bubble sort (and any sort that only swaps adjacent out-of-order elements) performs exactly as many swaps as there are inversions in the input — so you can count swaps without simulating the passes.
کارت قضیه کنکور ارشد علوم کامپیوتر