Skip to content

Commit 36505ba

Browse files
Move and reformat hints (exercism#593)
1 parent 8a4de87 commit 36505ba

File tree

7 files changed

+23
-32
lines changed

7 files changed

+23
-32
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## General
2+
3+
- For generating random numbers, Erlang's `:rand.uniform` or `Enum.random` are
4+
good places to start.
5+
- `:math.pow |> round` can be used to find the power of a number, and `rem` for
6+
the modulus.
7+
- Neither of those works particularly well (or quickly) for very large integers.
8+
Cryptography generally makes use of numbers larger than 1024 bits. Erlang's
9+
`:crypto` module has a useful function for finding the modulus of a power,
10+
particularly for enormous integers, but you might need `:binary` to decode it.

exercises/practice/diffie-hellman/hints/hints.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## General
2+
3+
- Use `Bitwise` (or div/rem).
4+
- If you use `Bitwise`, an easy way to see if a particular bit is set is to compare
5+
the binary AND (`&&&`) of a set of bits with the particular bit pattern you
6+
want to check, and determine if the result is the same as the pattern you're
7+
checking.

exercises/practice/secret-handshake/hints/hints.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## General
2+
3+
- `apply` will let you pass arguments to a function, as will `fun.(args)`.

exercises/practice/strain/hints/hints.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
Formatting the output is easy with `String`'s padding functions. All number
1+
## General
2+
3+
- Formatting the output is easy with `String`'s padding functions. All number
24
columns can be left-padded with spaces to a width of 2 characters, while the
35
team name column can be right-padded with spaces to a width of 30.

0 commit comments

Comments
 (0)