Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/playground.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

484 changes: 351 additions & 133 deletions .idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .pytest_cache/v/cache/lastfailed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"test/test_mat_function.py::FibonacciTests::test_zero": true
}
3 changes: 3 additions & 0 deletions .pytest_cache/v/cache/nodeids
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"test/test_mat_function.py::FibonacciTests::test_zero"
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions test/test_mat_function.py → Tests/test_mat_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class MatFunctionsTests(TestCase):

class FibonacciTests(TestCase):

pass



def test_zero(self):
input = 0
expected_result = 0
self.assertEqual(Fibonacci.fibonacci(0), 0 )


14 changes: 8 additions & 6 deletions Trees/BinaryTree.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
class GeneratorID(object):
id_counter = 0

def get_next_id():
id_counter = 1
while True:
yield id_counter
id_counter += 1
@staticmethod
def get_next_id():
while True:
yield GeneratorID.id_counter
GeneratorID.id_counter += 1


class Node(object):

generator_node_id = get_next_id()
generator_node_id = GeneratorID.get_next_id()
LEFT_LEAF = 0
RIGHT_LEAF = 1
LEAF_DESCRIPTUON = ['left', 'right']
Expand Down
2 changes: 1 addition & 1 deletion math_functions/mat_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def fibonacci(number):
return None
Fibonacci.number_of_execution += 1
if number == 0 or number == 1:
return number
return -2
return Fibonacci.fibonacci(number - 1) + Fibonacci.fibonacci(number - 2)

@staticmethod
Expand Down