Q640
Consider the following code snippet to find the smallest element in a linked list: struct Node int val; struct Node* next; *head; int get_min() struct Node* temp = head->next; int min_num = temp->val; while(temp != 0) if(_________) min_num = temp->val; temp = temp->next; return min_num; Which of the following lines should be inserted to complete the above code?
A.
temp > min_num
B.
val > min_min
C.
temp->val < min_num
AnswerD.
temp->val > min_num
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board