Advertisement
LEGEND2004

stack , queue , deque , priority_queue

Feb 4th, 2024
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define int long long
  5.  
  6. signed main()
  7. {
  8.  
  9.     /*
  10.     stack<int> s;
  11.     int x;
  12.     s.size();
  13.     s.empty();
  14.     s.push(x);
  15.     s.top();
  16.     s.pop();
  17.     */
  18.     /*
  19.     queue<int> q;
  20.     int x;
  21.     q.size();
  22.     q.empty();
  23.     q.push(x);
  24.     q.front();
  25.     q.pop();
  26.     */
  27.     /*
  28.     deque<int> q;
  29.     int x;
  30.     q.size();
  31.     q.empty();
  32.     q.front();
  33.     q.push_front(x);
  34.     q.pop_front();
  35.  
  36.     q.back();
  37.     q.push_back(x);
  38.     q.pop_back();
  39.     */
  40.     /*
  41.     priority_queue<int> q;
  42.     int x;
  43.     q.size();
  44.     q.empty();
  45.     q.push(x);
  46.     q.top(); // max element
  47.     q.pop() // delete max element
  48.     */
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement