- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Queue| Implement Queue with Java language | Data Structures for Beginners | Full Program | Part 2
In this session - we will discuss the Data Structures and Algorithms for Beginners
What is Queue and implement with java program.
What is Queue?
Ans:-
- Queue is a linear data structure where the first element is inserted from one end called REAR and deleted from the other end called as FRONT.
- Front points to the beginning of the queue and Rear points to the end of the queue.
- Queue follows the FIFO (First - In - First Out) structure.
- According to its FIFO structure, element inserted first - will also be removed first.
- In a queue, one end is always used to insert data (enqueue) and the other is used to delete data (dequeue), because queue is open at both its ends.
- The enqueue() and dequeue() are two important functions used in a queue.
Q. Basic Opration in Queue?
Ans:-
enqueue() : This function is used for adding an element into queue.
dequeue() : This function is used for the removing an element from queue.
init() : This function is used for initializing the queue.
Front : Front is used to get the front data item from a queue.
Rear : Rear is used to get the last item from a queue.
Q. Types of the Queue?
Ans:-
The standard queue data structure has the following variations:
Simple queue
Priority queue
Circular queue
Double-ended queue
Simple Queue: The simple queue is a normal queue where insertion take place at the FRONT of the queue and deletion take place at the END of the queue.
Priority Queue: In a prioqueue, the nodes will have some predefined proprity. Insertion in a priority queue is performed in the order of arrival of the nodes. The nodes have least priority will be removed form the priority queue.
Double-ended queue: In a standard queue, a character is inserted at the back and deleted in the front. However, in a double-ended queue, characters can be inserted and deleted from both the front and back of the queue.
Circular queues: A circular queue is an improvement over the standard queue structure. In a standard queue, when an element is deleted, the vacant space is not reutilized. However, in a circular queue, vacant spaces are reutilized.While inserting elements, when you reach the end of an array and you need to insert another element, you must insert that element at the beginning (given that the first element has been deleted and the space is vacant).
Видео Queue| Implement Queue with Java language | Data Structures for Beginners | Full Program | Part 2 канала XAdmin
What is Queue and implement with java program.
What is Queue?
Ans:-
- Queue is a linear data structure where the first element is inserted from one end called REAR and deleted from the other end called as FRONT.
- Front points to the beginning of the queue and Rear points to the end of the queue.
- Queue follows the FIFO (First - In - First Out) structure.
- According to its FIFO structure, element inserted first - will also be removed first.
- In a queue, one end is always used to insert data (enqueue) and the other is used to delete data (dequeue), because queue is open at both its ends.
- The enqueue() and dequeue() are two important functions used in a queue.
Q. Basic Opration in Queue?
Ans:-
enqueue() : This function is used for adding an element into queue.
dequeue() : This function is used for the removing an element from queue.
init() : This function is used for initializing the queue.
Front : Front is used to get the front data item from a queue.
Rear : Rear is used to get the last item from a queue.
Q. Types of the Queue?
Ans:-
The standard queue data structure has the following variations:
Simple queue
Priority queue
Circular queue
Double-ended queue
Simple Queue: The simple queue is a normal queue where insertion take place at the FRONT of the queue and deletion take place at the END of the queue.
Priority Queue: In a prioqueue, the nodes will have some predefined proprity. Insertion in a priority queue is performed in the order of arrival of the nodes. The nodes have least priority will be removed form the priority queue.
Double-ended queue: In a standard queue, a character is inserted at the back and deleted in the front. However, in a double-ended queue, characters can be inserted and deleted from both the front and back of the queue.
Circular queues: A circular queue is an improvement over the standard queue structure. In a standard queue, when an element is deleted, the vacant space is not reutilized. However, in a circular queue, vacant spaces are reutilized.While inserting elements, when you reach the end of an array and you need to insert another element, you must insert that element at the beginning (given that the first element has been deleted and the space is vacant).
Видео Queue| Implement Queue with Java language | Data Structures for Beginners | Full Program | Part 2 канала XAdmin
Комментарии отсутствуют
Информация о видео
9 июля 2022 г. 14:51:19
00:43:52
Другие видео канала





![REST API | CRUD Operations | Saving in Mysql DB using Spring Data JPA in Spring Boot [Step By Step]](https://i.ytimg.com/vi/cJz9R-L-6bA/default.jpg)




![25+ Tricky [Most Asked ] Core Java Interview Questions on Inheritance | OOPs concept Java | Part - 6](https://i.ytimg.com/vi/Ypq0B4vS83Q/default.jpg)









