Company: Juspay_7july
Difficulty: medium
Cloud Network Bandwidth Pricing Problem Description Background: In a cloud network, an infinite number of data centers are set up globally. Each data center is assigned a unique positive integer starting from 1. The cloud network has direct, bidirectional data channels between: Data center i and data center 2i . Data center i and data center 2i + 1 . There exists a unique shortest path between any two data centers. Initially, data transfer between any two data centers is free. However, due to network optimization, the cloud provider occasionally imposes bandwidth fees on certain data channels. The network provider will make several updates to the fees based on upcoming events. There are two types of events: 1. Fee Update: The cloud provider updates the bandwidth fee for all data channels along the shortest path between data centers a and b by adding a fee of x units. 2. Data Transfer: A customer needs to transfer data from one data center a to another data center b . The transfer alway