(array []int)
| 44 | } |
| 45 | |
| 46 | func iterativeCount(array []int) int { |
| 47 | n := len(array) |
| 48 | count := 0 |
| 49 | |
| 50 | for i := 0; i < n; i++ { |
| 51 | for j := i + 1; j < n; j++ { |
| 52 | if array[j] < array[i] { |
| 53 | count++ |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | return count |
| 58 | } |
no outgoing calls