Question: Question 7 Given n non-negative integers where each represents a point at coordinate . ' n ' vertical lines are drawn such that the

Question 7 Given n non-negative integers where each represents a point at


coordinate . ' n ' vertical lines are drawn such that the

two endpoints of line i is at and . Find two lines,

Question 7 Given n non-negative integers where each represents a point at coordinate . ' n ' vertical lines are drawn such that the two endpoints of line i is at and . Find two lines, which together with x-axis forms a container, such that the container contains the most water. The program should return an integer which corresponds to the maximum area of water that can be contained (maximum area instead of maximum volume sounds weird but this is the 2D plane we are working with for simplicity). Question 8 Find the factorial of a large number. PRACTICE NOW Question 9 Given an array of N non-negative integers arr[] representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. Question 10 Given an array of N integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m students, the task is to distribute chocolate packets such that: Each student gets one packet. The difference between the number of chocolates in the packet with maximum chocolates and the packet with minimum chocolates given to the students is minimum. Activate Windows Go to Settings to activate Wind

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Engineering Questions!