We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Flipped Classroom
Topic: STACK
Write Algorithm and Sample Input and Output
1. You are working on a simulation program that models
the processing of jobs in a computer system using a LIFO strategy. Each job is represented by a number, and you need to insert these jobs into the stack based on specific rules. The stack will only accept jobs that are larger than the current top job or if the stack is empty. If a job cannot be inserted, it should be discarded. Set of Numbers: 5,8,3,6,9,2,7.
2. Write an algorithm to maintain the browsing history of
a user, the recently visited URLs should be added in the top. When the user wants to revisit the URL the recent added element should be displayed.