Skip to content

Commit

Permalink
Move problems into subfolder to reduce import repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 3, 2024
1 parent 9f25109 commit 739eb7a
Show file tree
Hide file tree
Showing 93 changed files with 238 additions and 259 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def countfiles(lang):
'Python': ['Unity', 'docs'],
'C': ['c/Unity', 'cplusplus'],
'C++': ['c/', 'cplusplus/Unity'],
'JavaScript': ['node_modules', 'dist', 'target'],
'JavaScript': ['node_modules', 'dist', 'target', 'docs'],
'Rust': ['Unity'],
}
count = 0
Expand Down
2 changes: 1 addition & 1 deletion docs/src/python/lib/fibonacci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Includes
:language: python
:linenos:

.. tags:: python-iterator, fibonacci
.. tags:: python-iterator, fibonacci-number
6 changes: 3 additions & 3 deletions docs/src/rust/p0001.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Rust Implementation of Problem 1
================================

View source code :source:`rust/src/p0001.rs`
View source code :source:`rust/src/problems/p0001.rs`

.. rust:fn:: pub fn p0001::p0001() -> utils::Answer
.. rust:fn:: pub fn problems::p0001::p0001() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0001.rs
.. literalinclude:: ../../../rust/src/problems/p0001.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0002.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Rust Implementation of Problem 2
================================

View source code :source:`rust/src/p0002.rs`
View source code :source:`rust/src/problems/p0002.rs`

.. rust:fn:: pub fn p0002::p0002() -> utils::Answer
.. rust:fn:: pub fn problems::p0002::p0002() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0002.rs
.. literalinclude:: ../../../rust/src/problems/p0002.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0003.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 3
================================

View source code :source:`rust/src/p0003.rs`
View source code :source:`rust/src/problems/p0003.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0003::p0003() -> utils::Answer
.. rust:fn:: pub fn problems::p0003::p0003() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0003.rs
.. literalinclude:: ../../../rust/src/problems/p0003.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0004.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Rust Implementation of Problem 4
================================

View source code :source:`rust/src/p0004.rs`
View source code :source:`rust/src/problems/p0004.rs`

Problem Solution
----------------

.. rust:fn:: fn p0004::is_palindrome(x: u32) -> bool
.. rust:fn:: pub fn p0004::p0004() -> utils::Answer
.. rust:fn:: pub fn problems::p0004::p0004() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0004.rs
.. literalinclude:: ../../../rust/src/problems/p0004.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0005.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 5
================================

View source code :source:`rust/src/p0005.rs`
View source code :source:`rust/src/problems/p0005.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0005::p0005() -> utils::Answer
.. rust:fn:: pub fn problems::p0005::p0005() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0005.rs
.. literalinclude:: ../../../rust/src/problems/p0005.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0006.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 6
================================

View source code :source:`rust/src/p0006.rs`
View source code :source:`rust/src/problems/p0006.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0006::p0006() -> utils::Answer
.. rust:fn:: pub fn problems::p0006::p0006() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0006.rs
.. literalinclude:: ../../../rust/src/problems/p0006.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0007.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 7
================================

View source code :source:`rust/src/p0007.rs`
View source code :source:`rust/src/problems/p0007.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0007::p0007() -> utils::Answer
.. rust:fn:: pub fn problems::p0007::p0007() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0007.rs
.. literalinclude:: ../../../rust/src/problems/p0007.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0008.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Rust Implementation of Problem 8
================================

View source code :source:`rust/src/p0008.rs`
View source code :source:`rust/src/problems/p0008.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0008::p0008() -> utils::Answer
.. rust:fn:: pub fn problems::p0008::p0008() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0008.rs
.. literalinclude:: ../../../rust/src/problems/p0008.rs
:language: rust
:linenos:
6 changes: 3 additions & 3 deletions docs/src/rust/p0009.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 9
================================

View source code :source:`rust/src/p0009.rs`
View source code :source:`rust/src/problems/p0009.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0009::p0009() -> utils::Answer
.. rust:fn:: pub fn problems::p0009::p0009() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0009.rs
.. literalinclude:: ../../../rust/src/problems/p0009.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0010.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 10
=================================

View source code :source:`rust/src/p0010.rs`
View source code :source:`rust/src/problems/p0010.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0010::p0010() -> utils::Answer
.. rust:fn:: pub fn problems::p0010::p0010() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0010.rs
.. literalinclude:: ../../../rust/src/problems/p0010.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0011.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 11
=================================

View source code :source:`rust/src/p0011.rs`
View source code :source:`rust/src/problems/p0011.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0011::p0011() -> utils::Answer
.. rust:fn:: pub fn problems::p0011::p0011() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0011.rs
.. literalinclude:: ../../../rust/src/problems/p0011.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0012.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 12
=================================

View source code :source:`rust/src/p0012.rs`
View source code :source:`rust/src/problems/p0012.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0012::p0012() -> utils::Answer
.. rust:fn:: pub fn problems::p0012::p0012() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0012.rs
.. literalinclude:: ../../../rust/src/problems/p0012.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0013.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 13
=================================

View source code :source:`rust/src/p0013.rs`
View source code :source:`rust/src/problems/p0013.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0013::p0013() -> utils::Answer
.. rust:fn:: pub fn problems::p0013::p0013() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0013.rs
.. literalinclude:: ../../../rust/src/problems/p0013.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0014.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 14
=================================

View source code :source:`rust/src/p0014.rs`
View source code :source:`rust/src/problems/p0014.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0014::p0014() -> utils::Answer
.. rust:fn:: pub fn problems::p0014::p0014() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0014.rs
.. literalinclude:: ../../../rust/src/problems/p0014.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0015.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 15
=================================

View source code :source:`rust/src/p0015.rs`
View source code :source:`rust/src/problems/p0015.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0015::p0015() -> utils::Answer
.. rust:fn:: pub fn problems::p0015::p0015() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0015.rs
.. literalinclude:: ../../../rust/src/problems/p0015.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0016.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 16
=================================

View source code :source:`rust/src/p0016.rs`
View source code :source:`rust/src/problems/p0016.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0016::p0016() -> utils::Answer
.. rust:fn:: pub fn problems::p0016::p0016() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0016.rs
.. literalinclude:: ../../../rust/src/problems/p0016.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0017.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 17
=================================

View source code :source:`rust/src/p0017.rs`
View source code :source:`rust/src/problems/p0017.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0017::p0017() -> utils::Answer
.. rust:fn:: pub fn problems::p0017::p0017() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0017.rs
.. literalinclude:: ../../../rust/src/problems/p0017.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0018.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 18
=================================

View source code :source:`rust/src/p0018.rs`
View source code :source:`rust/src/problems/p0018.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0018::p0018() -> utils::Answer
.. rust:fn:: pub fn problems::p0018::p0018() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0018.rs
.. literalinclude:: ../../../rust/src/problems/p0018.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0019.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rust Implementation of Problem 19
=================================

View source code :source:`rust/src/p0019.rs`
View source code :source:`rust/src/problems/p0019.rs`

Includes
--------
Expand All @@ -11,9 +11,9 @@ Includes
Problem Solution
----------------

.. rust:fn:: pub fn p0019::p0019() -> utils::Answer
.. rust:fn:: pub fn problems::p0019::p0019() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0019.rs
.. literalinclude:: ../../../rust/src/problems/p0019.rs
:language: rust
:linenos:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rust/p0020.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Rust Implementation of Problem 20
=================================

View source code :source:`rust/src/p0020.rs`
View source code :source:`rust/src/problems/p0020.rs`

Problem Solution
----------------

.. rust:fn:: pub fn p0020::p0020() -> utils::Answer
.. rust:fn:: pub fn problems::p0020::p0020() -> utils::Answer
.. literalinclude:: ../../../rust/src/p0020.rs
.. literalinclude:: ../../../rust/src/problems/p0020.rs
:language: rust
:linenos:

Expand Down
Loading

0 comments on commit 739eb7a

Please sign in to comment.