General Discussions

M/M/1 Queue

Queueing theory provides a mathematical basis for understanding and predicting the behavior of communication networks. Basic Model: We can understand above model with below mentioned parameters: Inter-arrival time distribution Service time distribution Number of servers Queueing disciplines Number of buffers Common Notion: A/B/m Where: ‘m’ is the number of servers A and B can be… Continue reading M/M/1 Queue

General Discussions

Basic Queue Implementation – C

The C code for basic Queue Implementation can be found here: Queue Code Link

C Codes

Printing 1 to N in Binary Using Queue

One of the popular interview question asked on queue data structure: Write a program to print the numbers from 1 to N in Binary Representation using QUEUE data structure. Example: Input: N = 3 Output: 1, 10, 11 Input: N= 5 Output: 1, 10, 11, 100, 101 Code will follow the following Logic: Initialize queue… Continue reading Printing 1 to N in Binary Using Queue