Queue using Stacks

In queue using a stack problem, we have to implement the following functions of a queue using the standard functions of stack data structure, Enqueue: Add an element to the end of the queue Dequeue: Remove an element from the start of the queue Example Input: Enqueue(5) Enqueue(11) Enqueue(39) Dequeue()  …

Read more

Fizz Buzz

The problem name might seem fuzzy. Fizz Buzz is a game with which children are taught about the division. So, without much hassle let’s clear the buzz around it. Problem Statement Let us write a program where for multiples of 3 you print “Fizz”, for the multiples of 5 “Buzz” …

Read more

Translate »