Since you gave kind of a vague question. I'll just go with the basics. Amortized analysis in computer science is basically the study of worst case run times regarding a sequence of operations.
When looking at potential, it is the physicist's method.
phi (initial state) =0 and every state after is larger than 0.
It keeps track of time but relies on states to know where it is.
The equation C +phi (state')-phi(state) is the main equation. C is the time for an operation, "state" is before and "state'" is after.
There are sets of equations that dictate average run time with this.
ex.
phi (H)= 2n-m. n=number of elements, m=size of array.
This equation is used to calculate the time to double the size.
Python is actually an easy language to learn and use. IDLE is an iffy IDE to use. One thing about IDLE that drives me nuts is that when it saves a file, it converts tabs to spaces (you can adjust how many in the prefs). This causes impossible to find indentation errors because several spaces are NOT the same as a tab, but you can't see the difference on the screen.
# the standard way to put the main function after declaring functions and
# classes
if( __name__ == "__main__" ):
import sys
# check that the program was called with the correct number of arguments
if( len( sys.argv ) != 2 ):
sys.stderr.write( "\nusage: %s <argument>\n" % ( sys.argv[ 0 ] ) )
sys.exit( 1 )
else:
# do something nifty
sys.exit( 0 )
The correct answer is D. All of the methods listed above are ways of inserting new sheets into a workbook.
Multiple inheritance causes Diamond problem which happens when:
Class A is parent of class B and C
Now when class D will be inherited from both Class B and C it will have all the members of class A and B which if same will confuse the compiler to import which one?
C++ solves it by using virtual keyword with them and thus telling the compiler which one to inherit.
Java has introduced the interface concept rather then allowing multiple inheritance.