Question PRG-CPP-0005
EasyWhich C++ standard container is a dynamic array that grows automatically?
- A.
std::map
- B.
std::list
- C.
Show answer and explanation
Answer: C
vector stores elements contiguously and supports push_back in amortised O(1).
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
C++ question
Which C++ standard container is a dynamic array that grows automatically?
std::map
std::list
Answer: C
vector stores elements contiguously and supports push_back in amortised O(1).
std::vector
std::set