1

consider the function f defined here: struct item { int data; struct item * next; }; int f (struct item *p) { return((p==NULL) ||((p->next==NULL)||(p->data<=p->next->data) && (p->next))); } For a given linked list p, the function f returns 1 if and only if

Correct Answer: the element in the list are sorted in non-decreasing order of data value

Make the most of this question

This page focuses on one Data Structure and Algorithms (DSA) question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Data Structure and Algorithms (DSA) MCQ: consider the function f defined here: struct item { int data; struct item * next; }; int f (struct item *p) { return((p==NULL) ||((p->next==NULL)||(p->data next->data) && (p->next))); } For a given linked list p, the function f returns 1 if and only if | Extra Education