in c programming during selection sorting algo...
condition below is mentioned as :
array[index_of_min]<array[y]
Should be replaced with (if expected behaviour is to be considered) :
array[index_of_min]>array[y]
in c programming during selection sorting algo...
condition below is mentioned as :
array[index_of_min]<array[y]
Should be replaced with (if expected behaviour is to be considered) :
array[index_of_min]>array[y]
It depends on what you're trying to do
Use < if you want to sort ascending (for example).
Use > if you want to sort decending.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.