Tutor profile: Max S.
Subject: Python Programming
What is the difference between a tuple and a list?
A tuple is immutable meaning you cant change it. But a list is mutable, meaning it can be changed.
Subject: Java Programming
Why do we use inheritance and polymorphism
We use inheritance for passing down methods and attributes from the part to the child classes in order to promote maintenance and avoid duplication. Polymorphism is used to resolve classes that have the same base parent class. It could be at run time or compile time.
Subject: C++ Programming
How to insert in a doubly linked list and what is the time complexity?
We have to traverse the linked list one by one and then set the next pointer to the next node and modify the previous node's pointer to the newly created node. Depending on whether the list is sorted, time complexity would be O(n)
needs and Max will reply soon.