Español
Abrir en Telegram

Hilo سلام ببخشید این کد برای مرتب سازی انتخابی درست؟

6 mensajes · –
🍀
سلام ببخشید این کد برای مرتب سازی انتخابی درست؟ def selection_sort(arr): for i in range(len(arr)): minimum = i for j in range(i + 1, len(arr)): # Select the smallest value if arr[j] < arr[minimum]: minimum = j # Place it at the front of the # sorted end of the array arr[minimum], arr[i] = arr[i], arr[minimum] return arr
  1. C
    خوب بهش ورودی بدید بیینید کار میده یا نه.
    1. 🍀
      ورودی هم دادم ارور میده
          1. C
            WTH? کدتو این‌گونه بزن: def selection_sort(arr): ... .. . جای نقطه چینا همون تابع که تعریف کردی. print(selection_sort([1,4,3])) بزن ببین خروجی چی میده.

Un feed público abierto del índice de búsqueda ChatCrawler — el “Google del Telegram público”; se actualiza a medida que se rastrea la comunidad. Las horas se muestran en UTC.

Solo contenido público, API oficial de Telegram. Acerca de · Preguntas frecuentes · Límites del índice · Eliminar una página · Catálogo · Búsqueda · Cómo contamos