Algorithms_in_C  1.0.0
Set of algorithms implemented in C.
stack.h
1 /*
2  author: Christian Bender
3 
4  This header represents the public stack-interface.
5  The stack is generic and self growing.
6 */
7 
8 #ifndef __STACK__
9 #define __STACK__
10 
11 /*
12  initStack: initializes the stack with a capacity of 10 elements.
13 */
14 void initStack();
15 
16 /*
17  push: pushs the argument onto the stack
18 */
19 void push(void *object);
20 
21 /*
22  pop: pops the top element of the stack from the stack.
23  assumes: stack not empty.
24 */
25 void *pop();
26 
27 /*
28  size: gets the number of elements of the stack.
29 */
30 int size();
31 
32 /*
33  isEmpty(): returns 1 if stack is empty otherwise 0.
34 */
35 int isEmpty();
36 
37 /*
38  top: returns the top element from the stack without removing it.
39 */
40 void *top();
41 
42 #endif
create
List * create(double value)
Create list function, a new list containing one node will be created.
Definition: doubly_linked_list.c:92
node
Node, the basic data structure in the tree.
Definition: binary_search_tree.c:15
T
Definition: stack.c:16
node::data
int data
data of the node
Definition: binary_search_tree.c:18
main
int main()
Driver code.
Definition: client.c:70
max
#define max(a, b)
shorthand for maximum value
Definition: kohonen_som_topology.c:39
elem
Definition: stack.c:10