Question d’entretien chez Thomson Reuters

How do you convert stack to queue? SQL query to find the peak element.