Strings & Arrays β
Understanding strings and arrays is essential in programming contests and problem solving.
This page gathers tutorials, guided exercises, and problem sets to help you master them.
π Learning Resources β
- C++ Strings (Programiz)
- C++ Arrays (Programiz)
- C++ Vectors (Programiz)
- France-IOI β Algorithmic Training
π Problem Sets β
These problem sets are from Assiut University Training (Codeforces Group).
π‘ Tips β
- Prefer
std::string,std::vector, over arrays unless required. - Always check bounds when working with arrays or strings.
- Debug with small test cases before tackling larger inputs.
- Use
getline()when you need to read full lines with spaces instead of plaincin. - Learn key
std::stringmethods:.size(),.substr(),.find(),.push_back(). - Familiarize yourself with useful STL algorithms:
sort,reverse,min_element,max_element,accumulate. - Remember: arrays have fixed size, but
vectorgrows dynamicallyβuse accordingly. - Practice different loop styles: range-based loops and indexed loops each have their use cases.
- For performance, pass large strings or vectors by
const &reference, not by value.

