Day 2 of #gfg160
- Pushing 0s at the end
I learnt that using erase at every step would mean O(n) complexity at each step, which means O(n^2)๐คฏ
Optimized it to O(n)
#geeksforgeeks#160days@gfgigdtuw
This marks the beginning of #GfG160
Day 1
I solved
- Calculating Second largest element in array
My first approach was sorting it, but it is unnecessary as it takes O(nlogn) time complexity
My second approach solves in O(n)
@gfgigdtuw
Week 1 Updates:
I have completed Standard Template Library aka STL from my week 1 topics! It was challenging especially when I had to understand memset and vectors but I'm glad I made it through. <3
Hello X community!
Iโm thrilled to announce that Iโm participating in the #SummerSkillSprintChallenge by TechNeeds IGDTUW! ๐ This summer, Iโll be focusing on mastering Data Structures and Algorithms in C++, along with exploring Web Development.
Iโve created a personalized schedule to guide my learning journey, which you can check out below. Stay tuned for daily and weekly updates on my progress!