Advertisement
LEGEND2004

deque

Jan 26th, 2024
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include "bits/stdc++.h"
  2. using namespace std;
  3.  
  4. signed main()
  5. {
  6.     ios_base::sync_with_stdio(0);
  7.     cin.tie(0);
  8.         /*
  9.     deque<int> q;
  10.     q.size(); // olcusu
  11.     q.empty(); // bos olarsa true
  12.    
  13.     q.back(); // sagdaki
  14.     q.push_back(x); // sagdan elave
  15.     q.pop_back(); // sagdakini sil
  16.    
  17.     q.front(); // soldaki
  18.     q.push_front(x); // sola elave
  19.     q.pop_front(); // soldakini sil
  20.     */
  21.     /*
  22.     deque<int> q;
  23.     q.push_back(7);
  24.     q.push_front(5);
  25.     for(int i = 0; i < q.size(); i++){
  26.         cout << q[i] << " ";
  27.     }
  28. */
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement