This is an apti question, EQ = O(1), DQ = O(1) , MultiDQ = O(k) ; but you gotta notice here, if you wanna pop “k” elements, and decide not to use MultiDQ but do via DQ only, you will still have k.O(1) = O(k) only. Overall what I wanna say is, DQ and MultiDQ is one and same. So on an avg, for a element every operation takes O(1) only. Now, if there you are running “n” operations, that means you should have some numbre of EQ operations, say “x”. then you may have “n-x” number of DQ opeartions, so overall your complexity becomes : O(x+n-x) = O(n) only. This is very intuitive, don’t read the rest of the comments, it will only confuse you, try applying intuitional understanding to this.