-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Recursion #383
base: master
Are you sure you want to change the base?
Add Recursion #383
Conversation
""" | ||
|
||
def countZeros(n): | ||
if n<0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can have an space between n < 10 as in the next line you have n == 0 with spaces ;)
|
||
# Main | ||
from sys import setrecursionlimit | ||
setrecursionlimit(11000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better would be set_recursion_limit name
""" | ||
--------------------------------------- Sum Of Array ------------------------------------------ | ||
|
||
Given an array of length N, you need to find and return the sum of all elements of the array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you have docstrings explaining what you are proposing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love recursion! so I think you can lint your file because sometimes I see n=0 and sometimes n = 0 so just having a automatic linting should solve this for you.
The file names are not following the repository style and also, it is not the python convention. You should rename all to lower case with underscore style.
Description
Please include a summary of the change and which issue is fixed or what question/feature you have added.
Added Recursion questions for recursion.
Type of change
Please delete options that are not relevant.
Checklist: