zAssignment - Polynomial class #
Created Tuesday 14 January 2020
Polynomial Implement 3 functions main_for_polynominal.cpp Polynomial_Class.cpp CodingNinjas_Polynomial_soln.cpp
- Fourier transform can be used for efficient multiplication
Dynamic Array
- We need an array that can change the size as required, according to the user.
- How will we do this:
- We start with an arbitrary value of our choice.
- When the user adds an element, the add(int index, int element).
- we will put it if we have space.
- Else we will double the size of the array.
- We are not taking the number of elements he/she is adding.
- They can also say where they want to add the element. We should check size here too. Do step b.
- If no such value is provided, we will append the element.
- Learnt that overloading is very useful, default arguments cannot take it’s place;
- Remember to mark functions const wherever possible.