Info2Doble/numbers.h
silvana884 8f3ee7b9d7 Fertig
2025-12-11 09:46:50 +01:00

14 lines
564 B
C

#ifndef NUMBERS_H
#define NUMBERS_H
int compareFct(const void *a, const void *b);
// Returns len random numbers between 1 and 2x len in random order which are all different, except for two entries.
// Returns NULL on errors. Use your implementation of the binary search tree to check for possible duplicates while
// creating random numbers.
unsigned int *createNumbers(unsigned int len);
// Returns only the only number in numbers which is present twice. Returns zero on errors.
unsigned int getDuplicate(const unsigned int *numbers, unsigned int len);
#endif