- 3 Write Down Detailed Pseudo Code Implementing Procedure 3split Applied To An Input List Out Of A List Of The Form L 1 (1 MiB) Viewed 20 times
3. Write down detailed pseudo-code implementing procedure 3SPLIT applied to an input list. Out of a list of the form L:
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. Write down detailed pseudo-code implementing procedure 3SPLIT applied to an input list. Out of a list of the form L:
3. Write down detailed pseudo-code implementing procedure 3SPLIT applied to an input list. Out of a list of the form L: ao, a₁, a2, a3, a4, as,.. ...? ... 2 ai-1, ai, ai+1, an-1 you should be getting three lists Lo: ao, a3, a6, a9, a12, ..., L₁: a₁, a4, a7, a10, a13,..., L2: a2, as, as, a11, 214, Your implementation should be recursive. Adapt the approach presented in slide 11 of course file 3, substitute print operation with INSERT. Make sure your implementation properly treat lists of any length and the empty list as well. You are only allowed to use the basic operations of the List ADT, i.e. FIRST(L), END(L), RETRIEVE(p, L), LOCATE(x, L), NEXT(p, L), PREVIOUS(p, L), INSERT(x, p, L), DELETE(p, L), MAKENULL(L). ****