JavaScript Data Structures - Queue implementation with third-party library
Medium
10
2
47.7% Acceptance
In this lab, you will use Lodash, a popular JavaScript utility library, to implement a Queue data structure. The Queue will have enqueue
, dequeue
, and getSize
methods. Lodash provides efficient and easy-to-use methods to manipulate arrays, which will be useful for this lab. Your task is to:
- Install Lodash
- Import Lodash in the 'queue.js' file
- Create a 'Queue' class
- Implement 'enqueue' and 'dequeue' methods using Lodash's '.insert()' and '.pullAt()' methods respectively.
- Export the 'Queue' class as a default export.