File: dataStructure.tex

package info (click to toggle)
spooles 2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,012 kB
  • sloc: ansic: 146,834; csh: 3,615; makefile: 2,040; perl: 74
file content (37 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
\par
\section{Data Structures}
\label{section:Utilities:dataStructure}
\par
There are two data structures used in singly linked lists.
\begin{itemize}
\item
{\tt IP}: a singly linked list element with an {\tt int} data field.
\par
\hspace{0.5 in}
\begin{minipage}{2.5 in}
\begin{verbatim}
typedef struct _IP IP ;
struct _IP {
   int   val   ;
   IP    *next ;
} ;
\end{verbatim}
\end{minipage}
\item
{\tt I2OP}: 
a singly linked list element with two {\tt int} 
and one {\tt void *} data fields.
\par
\hspace{0.5 in}
\begin{minipage}{2.5 in}
\begin{verbatim}
typedef struct _I2OP I2OP ;
struct _I2OP {
   int    value0  ;
   int    value1  ;
   void   *value2 ;
   I2OP   *next   ;
} ;
\end{verbatim}
\end{minipage}
\end{itemize}