User Tools

Site Tools


opus:fall2012:tedmist1:datapart3

data Keyword 3

Function Pointer

Definition

Instead of referring to data values, a function pointer points to executable code within memory. When dereferenced, a function pointer can be used to invoke the function it points to and pass it arguments just like a normal function call.

References

data Keyword 3 Phase 2

Recursive tree traversal

Definition

A tree traversal is the process of examining each node exactly once in a systematic way. Different traversals are classified and named by the process in which they examine the tree. A recursive tree traversal examines the tree recursively which is the process of calling a function within itself. One example of recursion is two mirrors faced towards each other creating an infinite recursion.

References

data Keyword 3 Phase 2 Phase 2

Recursive tree transversal

Definition

A form of going through a Tree via recursion. Recusion is calling the function while still inside the function before finishing the original function.

References

Demonstration

lab46:~$ Please Enter Values For Tree Traversal (-1 to quit):
Enter Value: 2
Enter Value: 5
Enter Value: 7
Enter Value: 1
Enter Value: 8
Enter Value: 4
Enter Value: 0
Enter Value: 6
Enter Value: -1
lab46:~$ Your Numbers: 2,5,7,1,8,4,0,6

                2
               / \
              1    5
             /    / \
            0    4   7
                    / \ 
                   6   8
opus/fall2012/tedmist1/datapart3.txt · Last modified: 2012/11/28 20:17 by tedmist1