Question from the Algorithmics - Fundamentals test

Write an algorithm that adds a new product at the beginning of a list and removes the last element.

Medium

What about the following code:

perishableStock = [tomato, cucumber, egg, steak, ham];
    For all perishableStock 
            delete_last_element;
            add_newProduct_at_begin;
    End For
Author: KahinaStatus: Published(Update)Question passed 33 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!