__index_level_0__ int64 0 17.3k | prompt stringlengths 171 3.38k | completion stringlengths 13 4.91k |
|---|---|---|
7,619 | Ci-dessous se trouve une instruction qui décrit une tâche. Écrivez une réponse qui complète de manière appropriée la demande.
### Instruction :
Écrivez une fonction pour implémenter le tri par sélection.
### Réponse :
| def selection_sort(nums):\n for i in range(len(nums)):\n min_idx = i\n for j in range(i + 1, len(nums)):\n if nums[min_idx] > nums [j] :\n min_idx = j\n\n nums[i], nums[min_idx] = nums[min_idx], nums[i]<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.