Skip to content

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 ​


πŸ“ 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 plain cin.
  • Learn key std::string methods: .size(), .substr(), .find(), .push_back().
  • Familiarize yourself with useful STL algorithms: sort, reverse, min_element, max_element, accumulate.
  • Remember: arrays have fixed size, but vector grows 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.