아래의 C 코드를 MIPS 코드로 변환 할 수있는 사람이 있습니까? 재귀를 사용하고 21-2를 최종 답으로 사용하기로되어 있습니다. 감사! 여기C to MIPS convert
/*
x is a pointer to a linked list node and is not null.
Return the min value stored in the linked list.
Assume each node is stored in memory as an int (value) followed by a pointer to the next node (next), each a word wide.
You must write it with recursion. */
int findMin(node *x) {
if(x->next == NULL)
return x->value;
else {
int min = findMin(x->next);
if(min < x->value)
return min;
else
return x->value;
}
}
... 컴파일러를 사용합니까? –
이 숙제가 있습니까? – tjameson
@tjameson 주석의 두 번째 단락은 교수 나 TA가 사용하는 구절입니다. –