-2

The function of adding to a collection has been implemented in the figure. Accordingly, which of the following information is correct? enter image description here

a) A non-linear data type is organized. b) The cost of the addition function is O(n). C) The collection works according to the first-in, last-out rule. d) The collection uses a static memory structure.

I believe that b is the correct answer, but I'm not sure

A. S
  • 1

1 Answers1

0

Going through all the options :

  1. Given data structure looks like a SLL, hence it is definitely not a non-linear data structure.
  2. This is true, the worst case cost of addition function is O(n) since we would need to traverse the whole data structure.
  3. This is false, it looks like new elements would be added at any position like front,end,middle or anywhere not like a stack which uses LIFO.
  4. It can use static memory but given the dynamic nature of the size of data structure it cannot be true.