Understanding Queue
A queue is a linear data structure that follows the First-In-First-Out (FIFO) principle, where elements are inserted from one end called the rear (or back) and removed from the other end called the front. This makes queues ideal for scenarios where the order of operations matters, such as task scheduling, handling requests in a web server, or managing tasks in an operating system.