erikrhanson / problem-solving-with-algorithms-and-data-structures-using-python Goto Github PK
View Code? Open in Web Editor NEWExamples and work from Problem Solving with Algorithms and Data Structures Using Python
Examples and work from Problem Solving with Algorithms and Data Structures Using Python
I think this code should be like this code:
def append(self,item):
current = self.tail
temp = Node(item)
current.setNext(temp)
self.tail = temp # this code should be added in order to make the last appended item be the tail of the link.
`if not currentTree.getLeftChild():
currentTree.insertLeft(x)
else:
currentTree.insertRight(x)
parent = stack.pop()
currentTree = parent`
Above code should be present instead of
currentTree.setRootVal(int(i)) parent = pStack.pop() currentTree = parent
According to the description on the site, how is the answer Susan? If 7th person is to be eliminated then Susan gets eliminated in the second elimination. I think, in the for loop the n should be replaced by n-1. so that n-1 persons will be taken from the end of the queue to the front and hence nth person will be eliminated.
In the class code located in the folder listing files listing_8_23 and listing_8_24, there is an indentation error where a method and a class are at the same level of indentation. This issue violates the required Python syntax rules, as methods inside a class should be indented one level deeper than the class itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.