Write a program to implement a queue using an array. In this tutorial, You are going to learn about Queue data structure and their implementation using an array in C, C++ & Java. In my previous posts, I have explained Stack and Linked List data structure.
Queue Data Structure
In Queue data structure, An element is inserted at one end called rear and deleted at other end called front. As compared to stack data structure in which insertion and deletion are allowed only at one end. Queue data structure is also called FIFO (First In First out).
MCQ on stack and queue data structure. The concept of Stack and Queue data structure is very important in computer science. In my previous post i have discussed following things.
Stack program in C using Array.
Queue data structure and their implementation.
The purpose of this objective questions is to test how well you understand the concept of stack and queue.
Write a C, C++ program to reverse a linked list. Given a linked list, write a program to reverse a linked list. In this program, we will reverse a linked list using an iterative approach.
How to find duplicate element in an array with minimum time complexity
Last week i appeared for an interview with well-known product based company the person taking interview asked questions related to data structure, caching and optimization. So they asked the question how to find the duplicate element in an array with minimum complexity.
Bubble Sort program, Algorithm & their time complexity. Write a program to implement a bubble sort algorithm. What’s the time complexity of bubble sort algorithm ?
In this tutorial, We are going to learn about bubble sort algorithm and their implementation in various programming languages.
Bubble sort algorithm work by comparing each pair of adjacent elements and switching their positions if necessary. It repeats this process until all the elements are sorted.