0

Is this implementation good or not yet

Hi Please refer code of append function in the class. (This function is not yet complete for all cases , but fine for initial position i.e. 0) This function calls new operator twice i.e. two time allocation for size = new length i.e. one for temp and other time for class member m_pBuffer This two allocation is unnecessary overhead. So, modified with function like appendnew. It allocates only one time. Is this good or still scope of optimization is there? https://code.sololearn.com/cx6qocOmrghB/?ref=app

16th Jan 2023, 5:16 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Resposta
0
Thanks Mirielle
17th Jan 2023, 3:19 AM
Ketan Lalcheta
Ketan Lalcheta - avatar