Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadditon of integers using LL #2370
Conversation
TravisBuddy
commented
Aug 29, 2020
|
Hey @csendranshi, TravisCI finished with status TravisBuddy Request Identifier: d4a6c320-ea0b-11ea-9476-dd4d5d152bb6 |
|
Cool! Our linter is a bit picky about code style. The easiest way to fix these issues is:
|
|
Thanks for the guidance! I have executed the instructions. |
| self.head = None | ||
|
|
||
| # method to print the linked list | ||
| def printLL(self): |
This comment has been minimized.
This comment has been minimized.
cclauss
Aug 29, 2020
•
Member
It is more Pythonic to define a .__str__() method that returns a str then then we can do print(my_linked_list).
|
|
||
| # node definition | ||
| class Node: | ||
| def __init__(self, data): |
This comment has been minimized.
This comment has been minimized.
cclauss
Aug 29, 2020
Member
Please add Python type hints for function parameters as discussed in CONTRIBUTING.md.
| temp = temp.next | ||
|
|
||
| # method to push a new node onto the linked list | ||
| def push(self, newdata): |
This comment has been minimized.
This comment has been minimized.
cclauss
Aug 29, 2020
Member
Please add Python doctests for .push() and .add() as discussed in CONTRIBUTING.md.


csendranshi commentedAug 29, 2020
Describe your change:
Adding two integers of same length using Linked lists
Example add 321 + 248 = 569
(1)->(2)->(3) + (8)->(4)->(2) = (5)->(6)->(9)
Checklist:
Fixes: #{$ISSUE_NO}.