E
E
Evgenia Sadovskaya2018-12-13 00:04:37
Programming
Evgenia Sadovskaya, 2018-12-13 00:04:37

How is the array filled if the numbers are requested in reverse order, and the array is filled in direct order?

If the numbers are requested in reverse order, and the array (one-dimensional) is filled in direct order, then why consider direct and reverse order? Regarding the coordinates of the array (asks from the last to the first, and enters from the first cell to the last) or the direct order of filling relative to the reverse order of the request (that is, it asks from the last to the first, and then also fills from the last cell to the first)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Kotov, 2018-12-13
@koshak_junior

First option.

G
Griboks, 2018-12-13
@Griboks

This is called a stack - first in, last out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question