Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An industrial company has N factories,each producing some pollution every month. The company has decided to reduce its total fume emissions by equipping some of
An industrial company has N factories,each producing some pollution every month. The company has decided to reduce its total fume emissions by equipping some of the factories with one or more filters. Every such filter reduces the pollution of a factory by half.When a second or subsequent filter is applied, it again reduces by half the remaining pollution emitted after fitting the existing filtersFor example, a factory that initially produces units of pollution will generate units with one filter, units with filters and so on You are given an array of N integers describing the amount of pollution produced by the factories. your task is to find the minimum of filters needed to decrese the total sum of pollution by at least half. Write a java program in which given an array of integers A of length N returns the minimum number of filters needed to reduce the total pollution by at least half.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started