Lesson 10 of 24
vector: வளரும் Arrayvector: The Growable Array
9 min 30 XP
STL (Standard Template Library) C++-ன் மிகப்பெரிய பலம். vector தானாக வளரும் array: push_back சேர்க்கும், size() எண்ணிக்கை, v[i] அல்லது v.at(i) அணுகும். Competitive programming-ல் எல்லா இடத்திலும் vector!
The STL (Standard Template Library) is C++'s superpower. A vector is an array that grows: push_back adds, size() counts, v[i] or v.at(i) reads. Competitive programmers use vectors everywhere.
Example: edit me and press Run
Press Run to see the result here.v.at(i) எல்லையைச் சோதிக்கும் (exception எறியும்); v[i] சோதிக்காது, வேகமானது.
v.at(i) checks bounds and throws an exception; v[i] doesn't check but is faster.