Question: NOTE: First 2 questions are ADT pseudo code and are independent of implementation and only following methods can be used in an ADT pseudo code:
NOTE: First 2 questions are ADT pseudo code and are independent of implementation and only following methods can be used in an ADT pseudo code: empty(L), makenull(L), first(L), next(p, L), prev(p, L), end(L), retrieve(p, L), insert(x, p, L), delete(p, L), same(x, y). 1- Write ADT pseudo code printlist(L, x) to print elements of list L that are 2 x. (30 Pts) 2- Write ADT pseudo code countodd(L) that returns no. of odd elements in list L, assume list elements are type integer. (30 pts) NOTE: First 2 questions are ADT pseudo code and are independent of implementation and only following methods can be used in an ADT pseudo code: empty(L), makenull(L), first(L), next(p, L), prev(p, L), end(L), retrieve(p, L), insert(x, p, L), delete(p, L), same(x, y). 1- Write ADT pseudo code printlist(L, x) to print elements of list L that are 2 x. (30 Pts) 2- Write ADT pseudo code countodd(L) that returns no. of odd elements in list L, assume list elements are type integer. (30 pts)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
