Algorithm · Akuna Capital · Easy
Given two integer lists, profit and cost, evaluate the project at each shared index. A project is counted when its profit minus its cost is greater than zero. Return the total count. Elements are paired by position: compare profit[i] with cost[i] for the same index rather than forming every possible cross-list pair. Function signature: Input: profit: a list of integers giving the profit associated with each project. cost: a list of integers giving the cost associated with…
Checking your access…