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
1 ответ
0
Thanks Mirielle