human
What is a code to iterative selection sort for linked list and the other steps required given the following:
Iterative selection sort for linked list | .
Traverse the List.
Traverse the unsorted sublist.
Swap Data"
How can the above be solved in Python?
assistant
#Here is code to iterative selection sort for linked list and the other steps required.
 def selectionSort ( head ) :
	temp = head
	while ( temp ) :
		minn = temp
		r = temp . next
		while ( r ) :
			if ( minn . data > r . data ) :
				minn = r
			r = r . next
		x = temp . data
		temp . data = minn . data
		minn . data = x
		temp = temp . next