Compare commits
No commits in common. "main" and "tests-improvments" have entirely different histories.
main
...
tests-impr
@ -16,7 +16,9 @@ static void dublicateRandomEntry (unsigned int *numbers, unsigned int len)
|
||||
if (numbers && len > 2)
|
||||
{
|
||||
unsigned int dubIndx = rand() % (len - 1);
|
||||
unsigned int copyIndx = rand() % len;
|
||||
unsigned int copyIndx;
|
||||
|
||||
copyIndx = rand() % len;
|
||||
|
||||
numbers[len - 1] = numbers[dubIndx];
|
||||
|
||||
@ -67,7 +69,7 @@ unsigned int *createNumbers(unsigned int len)
|
||||
// Duplicate one random entry
|
||||
dublicateRandomEntry(numbers, len);
|
||||
|
||||
clearTree(root);
|
||||
clearTree(root); //Notwendigkeit muss noch restlichem Code entnommen werden
|
||||
return numbers;
|
||||
}
|
||||
|
||||
|
||||
@ -15,10 +15,6 @@ StackNode *push(StackNode *stack, void *data)
|
||||
{
|
||||
StackNode *newNode;
|
||||
newNode = (StackNode *)malloc(sizeof(StackNode));
|
||||
if (!newNode)
|
||||
printf("Speicherfehler: nicht genug Speicher");
|
||||
return stack;
|
||||
|
||||
newNode->data = data;
|
||||
|
||||
// ,-→ bedeutet Liste war leer - das neue Element hat keinen Nachfolger (next = NULL)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user