Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GeeksforGeeks Algorithms and Questions implemented in Python

NotificationsYou must be signed in to change notification settings

kaushikthedeveloper/GeeksforGeeks-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Following project containsPython3 implementation of the Algorithms and Questions found in GeeksforGeeks.

“Talk is cheap. Show me the code.”― Linus Torvalds


Format of the Programs :

1. # <link reffering to the respective GeeksforGeeks page>2. <from module import module | if any>3. <Data Structures used | if any>4. <Primary Function : handles the computation>    : return the desired result (whenever possible)5. <Helper functions | if any>6. # main7. if __name__=="__main__" :8. <inside main>    : get input from the user    : pre-processing of data | if required    : call the function    : print the result9. Documentation for the code    : Input Explanation    : Input <Example>   : Output <Example>10. Documentation of the GeeksforGeeks page content
  • For better code understanding, please follow theStyle guide for python (PEP 8) recommendations as per the Python docs.
  • Keep the code/documentation within warp of100 letters. If the line exceeds this limit, bring it down to the next line.
  • Also, do not forget to leave ample number of comments!!

“Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‘How can I improve the code so that this comment isn’t needed?'”– Steve McConnell

Imp : In the code, provideFunction Annotations as perPEP 3107 -- Function Annotationsfor every parameter passed in a function. Return type specification is optional.

Annotations forparameters take the form of optional expressions that follow the parameter name:

deffoo(a:expression,b:expression=5):    ...#Ex :deffoo(l:list,s:str='xyz'):    ...#In pseudo-grammar, parameters now look like identifier [: expression] [= expression]

Annotations for the type of a function's return value take the form of optional expressions that is done like so:

deffoo()->expression:    ...#Ex :defsum()->int:    ...

Note : this is not affiliated with GeeksforGeeks in any way other than for reference purpose.
Also Note : the code implemetation (and sometimes even algorithm) might be different than the one in GeeksforGeeks. The decision is upon the author and author alone. New Algorithms for the same problem statement may be added in the future.

About

GeeksforGeeks Algorithms and Questions implemented in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp