Back to problems

QR HackerRank: Profitable Pairs and Delivery Order

Algorithm · Akuna Capital · Medium

Requirements Question 1: Count Positive-Value Project Pairs For every project, calculate its net amount as profit[i] - implementationCost[i]. Determine how many index pairs (i, j) satisfy 0 <= i < j < n and meet the condition below: Question 2: Goods Delivery Ordering A manufacturer ships products to cities linked by two-way roads. Rules: City labels range from 1 through n. Because the road network can contain separate components, certain cities might not be reachable.…

Checking your access…