Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ampulhetadosaber/21ce3cc86bcc835f8241864f92eebe8f to your computer and use it in GitHub Desktop.
Save ampulhetadosaber/21ce3cc86bcc835f8241864f92eebe8f to your computer and use it in GitHub Desktop.
priority_queue<int> fila;
fila.push(3);
fila.push(1);
fila.push(2);
fila.pop(); // Remove o primeiro elemento da fila, ou seja, o 3.
cout << fila.top() << "\n";
// O programa irá imprimir o número 2,
// que é agora o elemento da frente
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment