forked from freudenreichan/info2Praktikum-DobleSpiel
numbers
This commit is contained in:
1 parent
9d32e06f3a
commit
c3b1cdd3a3
2 files changed
+3
-1
No files matched your search
@@ -64,7 +64,7 @@ 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) {
|
||||
unsigned int getDuplicate(const unsigned int *numbers, unsigned int len) {
|
||||
if (!numbers || len < 2)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef NUMBERS_H
|
||||
#define NUMBERS_H
|
||||
|
||||
int compareUnsignedInt(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.
|
||||
|
||||
Reference in new issue
Block a user