-
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a4de87
commit 36505ba
Showing
7 changed files
with
23 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## General | ||
|
||
- For generating random numbers, Erlang's `:rand.uniform` or `Enum.random` are | ||
good places to start. | ||
- `:math.pow |> round` can be used to find the power of a number, and `rem` for | ||
the modulus. | ||
- Neither of those works particularly well (or quickly) for very large integers. | ||
Cryptography generally makes use of numbers larger than 1024 bits. Erlang's | ||
`:crypto` module has a useful function for finding the modulus of a power, | ||
particularly for enormous integers, but you might need `:binary` to decode it. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## General | ||
|
||
- Use `Bitwise` (or div/rem). | ||
- If you use `Bitwise`, an easy way to see if a particular bit is set is to compare | ||
the binary AND (`&&&`) of a set of bits with the particular bit pattern you | ||
want to check, and determine if the result is the same as the pattern you're | ||
checking. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## General | ||
|
||
- `apply` will let you pass arguments to a function, as will `fun.(args)`. |
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
exercises/practice/tournament/hints/hints.md → exercises/practice/tournament/.docs/hints.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Formatting the output is easy with `String`'s padding functions. All number | ||
## General | ||
|
||
- Formatting the output is easy with `String`'s padding functions. All number | ||
columns can be left-padded with spaces to a width of 2 characters, while the | ||
team name column can be right-padded with spaces to a width of 30. |