Skip to content

Create fibonacci_sequence_dnc.py#1631

Closed
LeeJiHyeong wants to merge 5 commits intoTheAlgorithms:masterfrom
LeeJiHyeong:master
Closed

Create fibonacci_sequence_dnc.py#1631
LeeJiHyeong wants to merge 5 commits intoTheAlgorithms:masterfrom
LeeJiHyeong:master

Conversation

@LeeJiHyeong
Copy link
Copy Markdown

No description provided.

Find Fibonacci sequence quickly by divide and conquer
Find Fibonacci sequence quickly by divide and conquer
>>> get_fibonacci(10)
55
>>> get_fibonacci(20)
6765
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write a doctest for a case where n < 2, also what about n < 1 and n < 0

return get_squared(matrix, n)[0][1]


def get_squared(matrix, n):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry if i was unclear, but you need to write doctests for all the methods/functions, taking into considerations all the cases i.e covering all the branches of your code.

Check this out for idea https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/circular_linked_list.py

@onlinejudge95 onlinejudge95 added awaiting changes A maintainer has requested changes to this PR require tests Tests [doctest/unittest/pytest] are required labels Dec 12, 2019
@github-actions
Copy link
Copy Markdown

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes A maintainer has requested changes to this PR require tests Tests [doctest/unittest/pytest] are required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants