Skip to content

Conversation

@piyushP7pravin
Copy link

@piyushP7pravin piyushP7pravin commented Jul 21, 2020

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.

  • New feature/question

Checklist:

  • My code follows the style guidelines of this project i.e. Pep8
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

"""

def countZeros(n):
if n<0:

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)

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.

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

Copy link

@laysauchoa laysauchoa left a 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.

https://www.python.org/dev/peps/pep-0008/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants