From e04375c4fbdb8ba7461c7a017f64e154480e3d1e Mon Sep 17 00:00:00 2001 From: njain095 <56039554+njain095@users.noreply.github.com> Date: Tue, 1 Oct 2019 22:31:42 +0530 Subject: [PATCH] Update selection_sort --- selection_sort | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/selection_sort b/selection_sort index 15bc93e..db3058c 100644 --- a/selection_sort +++ b/selection_sort @@ -1,27 +1,22 @@ +void selection_sort (int A[ ], int n) { + // temporary variable to store the position of minimum element -#include -#define MAX 100 -int main(void) -{ - int arr[MAX],i,j,k,n; - printf("Enter the number of elements : "); - scanf("%d",&n); - for(i=0; i=0 && k