Skip to content

Tanmay-901/Cpp-Algorithms

Repository files navigation

basic operations:

  1. Pre-processor derivative: # include<bits/stdc++.h> , #include<iostream>

  2. standard library usage: using namespace std;

  3. important data types:

    • vector: vector\<int\> v;
    • unordered map: `unordered_map<string, int> umap;
    • ordered map: map<int, int> order;
  4. Operations on vector: v.push_back(x); , v.pop_back();

  5. output all the vector elements: for(int i = 0; i < v.size(); i++) cout<<v[i]<<"\n";

  6. sort: sort(v.begin(), v.end());