Question
Which data structure uses the LIFO
principle?Solution
"A Stack follows the Last-In-First-Out (LIFO) principle, meaning the last element added is the first to be removed. Examples include the call stack in programming. Common stack operations: push, pop. Stacks are used in undo operations. Can be implemented using arrays or linked lists."
A boat covers 150 km downstream in the same time it takes to cover 90 km upstream. If the speed of the stream is 5 km/h, determine the speed of the boat...
When travelling downstream, a boat takes 7 hours to travel 280 km. If the speed of the stream is (2/5)th of downstream speed of the boat, the...
Speed of boat is 15 km/hr. Speed of the stream is 20% less than speed of boat. Then find time taken by boat to go 108 km downstream?
A boat travels 36 km upstream and 48 km downstream in 8 hours. If the speed of the stream is 3 km/h and the boat’s speed in still water is 9 km/h, wha...
Speed of a boat in still water is 48 km/h and the speed of stream is 25% of the speed of boat in still water. If the time taken by boat to cover a dista...
- The speed of a boat in still water is 8 km/hr, and the speed of the current is 3 km/hr. If the boat takes a total of 10 hours to travel ‘x’ km both ups...
- The ratio of the boat's speed in still water to the speed of the stream is given as 12:1. The boat takes a total time in the ratio 13:9 to travel (d + 48) ...
A boat's speed in still water is 12 km/hr, and the current’s speed is 4 km/hr. If the boat takes a total of 18 hours to travel ‘x’ km each in both...
Find the total distance covered by boat in each upstream and downstream in 6 hours if the speed of boat in still water and speed of current is 15 km/h a...
The speed of a boat in still water is 7 km/hr and the speed of the stream is 2.5 km/hr. A man rows to a place at a distance of 42.75 km and comes back t...