Skip to content

Commit 859bdb4

Browse files
committed
update(travis): update for recent elixir v going forward
1 parent 79c4785 commit 859bdb4

File tree

6 files changed

+111
-62
lines changed

6 files changed

+111
-62
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
language: elixir
22
elixir:
3-
- 1.6.6
4-
- 1.7.2
5-
- 1.8.2
63
- 1.9.0
74

85
otp_release:

CONTRIBUTING.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ We are very happy that you consider implementing algorithms and data structure f
1515
- Your work will be distributed under [MIT License](License) once your pull request is merged
1616
- You submitted work fulfils or mostly fulfils our styles and standards
1717

18-
**New implementation** is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity.
18+
**New implementations** are welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity.
1919

2020
**Improving comments** and **writing proper tests** are also highly welcome.
2121

@@ -29,21 +29,14 @@ Your contribution will be tested by our [automated testing on Travis CI](https:/
2929

3030
We want your work to be readable by others; therefore, we encourage you to note the following:
3131

32-
33-
3432
- Original code submission require module definitions or comments to describe your work.
35-
36-
37-
3833
- Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms.
3934
- If you need a third party module that is not in the file __mix.exs__, please add it to that file as part of your submission.
35+
- Format your work, or it will fail the tests.
4036

41-
#### Other Standard While Submitting Your Work
37+
#### Other Standards While Submitting Your Work
4238

43-
- File extension for code should be `.exs`. Jupiter notebook files are acceptable in machine learning algorithms.
4439
- Strictly use snake_case (underscore_separated) in your file_name, as it will be easy to parse in future using scripts.
45-
- Please avoid creating new directories if at all possible. Try to fit your work into the existing directory structure.
46-
- If possible, follow the standard *within* the folder you are submitting to.
4740
- If you have modified/added code work, make sure the code compiles before submitting.
4841
- If you have modified/added documentation work, ensure your language is concise and contains no grammar errors.
4942
- Do not update the README.md or DIRECTORY.md file which will be periodically autogenerated by our Travis CI processes.

DIRECTORY.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
11

2+
3+
## Arithmetic Analysis
4+
5+
## Backtracking
6+
7+
## Blockchain
8+
9+
## Boolean Algebra
10+
11+
## Ciphers
12+
13+
## Compression
14+
15+
## Conversions
16+
17+
## Data Structures
18+
* Linked List
19+
* [Singly Linked List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py)
20+
21+
## Digital Image Processing
22+
23+
## Divide And Conquer
24+
25+
## Dynamic Programming
26+
27+
## File Transfer
28+
29+
## Fuzzy Logic
30+
31+
## Graphs
32+
33+
## Hashes
34+
35+
## Linear Algebra
36+
37+
## Machine Learning
38+
39+
## Maths
40+
41+
## Matrix
42+
43+
## Networking Flow
44+
45+
## Neural Network
46+
47+
## Other
48+
49+
## Project Euler
50+
51+
## Searches
52+
53+
## Sorts
54+
55+
## Strings
56+
57+
## Traversals
58+
59+
## Web Programming
60+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
defmodule Algorithims.DataStructures.LinkedList do
1+
defmodule Algorithims.DataStructures.SinglyLinkedList do
22
defmodule SingleLink, do: defstruct([:value, :reference])
33

44
def add_node([], value) do
5-
[form_singly_linked_list(value, nil)]
5+
[form_link(value, nil)]
66
end
77

88
def add_node([head | _tail] = list, value) do
9-
[form_singly_linked_list(value, head) | list]
9+
[form_link(value, head) | list]
1010
end
1111

12-
defp form_singly_linked_list(value, reference) do
12+
defp form_link(value, reference) do
1313
%__MODULE__.SingleLink{value: value, reference: reference}
1414
end
1515
end

test/data_structures/linked_list_test.exs

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
defmodule Algorithims.DataStructures.SinglyLinkedListTest do
2+
alias Algorithims.DataStructures.SinglyLinkedList
3+
4+
use ExUnit.Case
5+
doctest Algorithims
6+
7+
describe "add_node/2" do
8+
test "it works when the list is empty" do
9+
assert SinglyLinkedList.add_node([], 3) == [
10+
%SinglyLinkedList.SingleLink{
11+
value: 3,
12+
reference: nil
13+
}
14+
]
15+
end
16+
17+
test "it adds to the head" do
18+
list =
19+
SinglyLinkedList.add_node([], 3)
20+
|> SinglyLinkedList.add_node(4)
21+
|> SinglyLinkedList.add_node(5)
22+
23+
assert list == [
24+
%Algorithims.DataStructures.SinglyLinkedList.SingleLink{
25+
reference: %Algorithims.DataStructures.SinglyLinkedList.SingleLink{
26+
reference: %Algorithims.DataStructures.SinglyLinkedList.SingleLink{
27+
reference: nil,
28+
value: 3
29+
},
30+
value: 4
31+
},
32+
value: 5
33+
},
34+
%Algorithims.DataStructures.SinglyLinkedList.SingleLink{
35+
reference: %Algorithims.DataStructures.SinglyLinkedList.SingleLink{
36+
reference: nil,
37+
value: 3
38+
},
39+
value: 4
40+
},
41+
%Algorithims.DataStructures.SinglyLinkedList.SingleLink{reference: nil, value: 3}
42+
]
43+
end
44+
end
45+
end

0 commit comments

Comments
 (0)