Queue Data Structure in JavaScript | Circular Queue

preview_player
Показать описание
#datastructures #algorithm #queue

Hello Everyone, In this video we will learn about queue data structure in javascript. We will implement queue using array, linked list and stacks. We will also learn about circular queue data structure.

Timestamps:

0:00 Queue Data Structure
2:11 Implement Queue using Array
2:46 isEmpty()
3:06 back()
3:32 front()
3:50 enQueue()
4:16 deQueue()
4:50 Testing Queue Implementation
7:14 Queue enQueue Working
9:31 Implement Queue Using Linked List
10:42 isEmpty()
11:01 back()
11:12 front()
11:32 enQueue()
13:07 Testing Queue Enqueue
15:05 Queue deQueue Working
15:31 deQueue()
16:57 Implement Queue using Stack
17:54 Intuition
21:03 Coding
23:43 Why do we need Circular Queue
27:46 Design Circular Queue
29:06 enQueue() Intuition
30:50 enQueue() Code
31:44 deQueue() Intuition
33:04 deQueue() Code

Connect with me,

#FrontendWithVishal
Рекомендации по теме
Комментарии
Автор

really a great video for js topics..thanks!

bhawnasingh
Автор

inshort all ds to use in interview
## **Commonly used data structures**

1. **Arrays** — These are mutable lists in JavaScript. Helpful methods include `concat`,  `slice`,  `splice`,  `indexOf`
2. **Maps** — 1:1 mapping of unique `key` to `value`, can be built with `Map()` or plain JavaScript object `{}`. Helpful methods include `Object.keys()`,  `Object.entries()`,  `Object.values()`,  `for (let key in obj) { ... }`,  `{}.hasOwnProperty()`. If you use a plain JS object, note that there are built-in prototype methods such as `constructor` that may interfere with your keys.
3. **Stack** — First in, first out ordered data store, use
4. **Queue** — Last in, first out ordered data store, use
5. **Set** — Check for uniqueness,  `Set()` has methods that include `has()` and `add()`. Use `Array.from(set)` to convert to an array. Alternatively, use `Map()`.
6. **Tree or graph** — Use JavaScript objects as nodes, pointers don’t exist in JavaScript.
7. **Trie** — Tree where nodes have many children nodes that could correspond to characters in the alphabet. Very useful for finding words or patterns such as anagrams, palindromes, and word search puzzles.

AdityaSharan
Автор

Sir I've been following this series from the Start and will complete it with you. I hope the startup referral is still up.

Aviralsingh-ywxx
welcome to shbcf.ru