|
|
|
|||||||||||||
We need to know what is meant by
“particular position” we have used “?” for this in the above table. There are
two possibilities:
The first option is used in the data structures
like arrays. When we have to manipulate the arrays, we use index like x[3], x[6]. In the second option we do
not use first, second etc for position but say wherever is the current
pointer. Just think of a pointer in the list that we can move forward or
backward. When we say get, insert or update while using the current pointer,
it means that wherever is the current pointer, get data from that position,
insert data after that position or update the data at that position. In this
case, we need not to use numbers. But it is our responsibility that current
pointer is used in a proper way. If we use the “current” marker, the
following four methods would be useful:
In the next lecture, we will discuss
the implementation of the list data structure and write the functions
discussed today, in C++ language. |
|||||||||||||||
|
BACK |
HOME |
|
||||||||||||