generated from freudenreichan/info2Praktikum-DobleSpiel
changed comments on bintree.c again
This commit is contained in:
parent
99c1135bcf
commit
0d26b791c4
@ -2,6 +2,7 @@
|
|||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "bintree.h"
|
#include "bintree.h"
|
||||||
|
|
||||||
|
//Komplexität 𝑂(ℎ) mit ℎ = Höhe des Baums ??
|
||||||
//fügt einen kopierten Datensatz in einen binären Suchbaum ein und meldet optional Duplikate.
|
//fügt einen kopierten Datensatz in einen binären Suchbaum ein und meldet optional Duplikate.
|
||||||
TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize, CompareFctType compareFct, int *isDuplicate)
|
TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize, CompareFctType compareFct, int *isDuplicate)
|
||||||
{
|
{
|
||||||
@ -49,7 +50,8 @@ TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize, CompareFc
|
|||||||
// Use your implementation of a stack to organize the iterator. Push the root node and all left nodes first. On returning the next element,
|
// Use your implementation of a stack to organize the iterator. Push the root node and all left nodes first. On returning the next element,
|
||||||
// push the top node and push all its left nodes.
|
// push the top node and push all its left nodes.
|
||||||
|
|
||||||
//liefert nacheinander die Elemente in aufsteigender Reihenfolge (Inorder) und merkt sich den Zustand zwischen Aufrufen mit einem Stack.
|
//liefert nacheinander die Elemente in aufsteigender Reihenfolge (Inorder) (also wie sortiert) und merkt sich den Zustand zwischen Aufrufen mit einem Stack.
|
||||||
|
//Übergabe eines root initialisiert oder startet neu; root == NULL setzt die Iteration fort.
|
||||||
void *nextTreeData(TreeNode *root)
|
void *nextTreeData(TreeNode *root)
|
||||||
{
|
{
|
||||||
/* static iterator state using stack.c */
|
/* static iterator state using stack.c */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user