Learning Topics

Choose Topics Accordingly

Vector in C++

  1. Vectors are the same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container.
  2. Vector elements are placed in contiguous storage so that they can be accessed and traversed using iterators.
vector<int>v; Size:2
v.front(): 10
v.back(): 1
10
1

Code

  1. Initializing a Vector
    CPP
  2. Sort a Vector
    CPP
  3. Minimum Element in Vector
    CPP
  4. Maximum Element in Vector
    CPP
  5. Sum of all Numbers in Vector
    CPP
  6. Reverse a Vector
    CPP

Solve Questions