using System;using System.Collections.Generic;public class GFG {     public class Geeks {           public void insert(Queue q, int k)    {                q.Enqueue(k);    }            public int findFrequency(Queue q, int k)    {                int cntFrequency = 0;                int size = q.Count;                while (size– != 0) {                                    int x = q.Peek();            q.Dequeue();                                    if (x == k) {                                cntFrequency++;            }                                    q.Enqueue(x);        }                return cntFrequency;    }}        public static void Main()    {                       Queue q = new Queue();        int N = 8;        int[] a = new int[] { 1, 2, 3, […]

Continue Reading