New course! Every coder should learn Generative AI!
Try a free lesson+ 4
How can we minimize or decrease the speed of execution as well as memory occupied for the below code . Please help me in this.
1 Answer
+ 1
pettemsrikanthvarma other than vector approach mentioned by Tind , you can go with dynamic array as below:
int a[100000] can be changed to int* a = new int [n]