Problem - Vehicles and Wheels
An automobile company manufactures both a two wheeler (TW) and a four wheeler (FW). A company manager wants to make the production of both types of vehicle according to the given data below:
- 1st data, Total number of vehicle (two-wheeler + four-wheeler) = v
- 2nd data, Total number of wheels = W
Problem - Find Count of Elements Greater Than All Prior Elements
Given an integer array Arr of size N, find the count of elements whose value is greater than all of its prior elements. (Note: The 1st element is always counted.)
Arr[] = {7, 4, 8, 2, 9} → Output: 3
Problem - Find the Row with Maximum Parking Spaces Full
A parking lot in a mall has R x C number of parking spaces. Each parking space will either be empty (0) or full (1). The task is to find the index of the row (R) in the parking lot that has the most parking spaces full (1).
Problem - Maximum Guests on a Cruise
A party has been organised on a cruise for a limited time (T). The number of guests entering (E[i]) and leaving (L[i]) the party at every hour is represented as elements of the array. The task is to find the maximum number of guests present on the cruise at any given instance within T hours.