You can Initialize a list with pre-placed values:
List<int> L1 = new List<int> {1, 2, 3};
is there an equivalent of above for Queue? My idea was :
Queue<int> Q1 = new Queue<int> {1, 2, 3};
which doesn't work. Is there any workaround?
Is
Queue<int> Q1 = new Queue<int>();
Q1.Enqueue(1);
Q1.Enqueue(2);
Q1.Enqueue(3);
the only valid solution?