Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .

0 like 0 dislike
1,026 views
in Online Assessments by Expert (44,360 points)

2 Answers

0 like 0 dislike
 
Best answer

Images of ques

image

by Expert (44,360 points)
0 like 0 dislike
Q2: Count mismatches of lunchboxes and students. Intuition: the queue can be cycled until front of queue matches top of stack; even if we get rid of one lunchbox at a time, the queue will eventually deplete until the remaining lunchboxes in stack don't match any student's preference.
by Expert (44,360 points)
...