A is correct. Tested. Firstly 1000 is added (at the back), then 2000 is added to front, then 3000 is added to back and finally 4000 to front, so deque looks like 4000-2000-1000-3000 and remove and pop do the same thing which is take value from from of deque and those values are 4000 and 2000 which are printed.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
pul26
Highly Voted 3 years, 7 months agosteefaand
Most Recent 5 months, 4 weeks agoYasinGaber
2 years, 5 months agoSvetleto13
3 years, 2 months agoSigamani
3 years, 2 months agoSigamani
3 years, 2 months ago