What clause represents the size-(N-1) problem? bar([ ],[ ]). bar([X | L], F) :- bar(L, G), append(G, [X], F).

Given the following set of the recursive rules, what clause represents the size-(N-1) problem? 

bar([ ],[ ]).  
bar([X | L], F) :- bar(L, G), append(G, [X], F).


Answers:      

A. bar([ ], [ ]).
B. bar(L, G).  
C. append(G, [X], F).
D. bar([X | L], F).

Answer. B.


Computer Science

Learn More Multiple Choice Question :