Skip to content

Commit

Permalink
Remove the bad random
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanpranav committed Feb 12, 2024
1 parent f07b6d3 commit 08e7781
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ which is licensed under the GNU Lesser General Public License v3.0 (`LGPL-3.0`).
| 29 | [Divide Two Integers](src/lc0029.c) | Mathematics | Quotient | |
| 31 | [Next Permutation](src/lc0031.c) | Array | Permutation | `PermutationIterator` |
| 46 | [Permutations](src/lc0046.c) | Array | Permutation | `PermutationIterator` |
| 49 | [Group Anagrams](src/lc0049.c) | Combinatorics | Sort | `Lookup` |
| 50 | [Pow(x, n)](src/lc0050.c) | Mathematics | Power | `pow` |
| 60 | [Permutation Sequence](src/lc0060.c) | Mathematics | Permutation | `PermutationIterator` |
| 62 | [Unique Paths](src/lc0062.c) | Combinatorics | Binomial coefficient | `binomial` |
Expand Down
9 changes: 0 additions & 9 deletions lib/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
/** Defines a random number generator. */
typedef long long (*Random)(void* instance, long long max);

/**
* Generates a random integer in the interval [0, `min(max, RAND_MAX)`].
*
* @param instance the instance.
* @param max the exclusive upper bound of the generated integer.
* @return A random integer in the interval [0, `min(max, RAND_MAX)`).
*/
long long random(Object instance, long long max);

/**
* Generates a random integer in the interval [0, `max`) using Blackman and
* Vigna's xoshiro256** (exclusive or-shift-rotate, 256-bit) algorithm.
Expand Down
18 changes: 0 additions & 18 deletions lib/randoms/random.c

This file was deleted.

1 change: 0 additions & 1 deletion src/id0070.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ int main(void)
euler_ok(sieve(&primes, max));
euler_ok(string_builder(&nDigits, 0));
euler_ok(string_builder(&phiDigits, 0));

sieve_begin(&p, &primes);

for (sieve_jump(&p, min); p.current < max; sieve_next(&p))
Expand Down

0 comments on commit 08e7781

Please sign in to comment.