English
Open in Telegram

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

6 messages · –
🍀
سلام ببخشید این کد برای مرتب سازی انتخابی درست؟ 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. 🍀
      ورودی هم دادم ارور میده
          1. D
            WTH? کدتو این‌گونه بزن: def selection_sort(arr): ... .. . جای نقطه چینا همون تابع که تعریف کردی. print(selection_sort([1,4,3])) بزن ببین خروجی چی میده.
PPython + Linux ExpertsPython + Linux Experts@PythonLinuxExperts · group · Tech
4 287members20writing in 30 days
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count