Company: Salesforce_4th june_on campus _iit guwahti

Difficulty: medium

Problem Statement

In a Salesforce multi-cloud architecture, there is a circular network of m cloud servers, numbered from 1 to m, where servers 1 and m are adjacent. These servers handle various customer requests, and the latency between switching from one server to the next or the previous is given by an array, transitionTime[i], representing the time required to transition from the ith server to its adjacent servers. A sequence of requested servers (represented as an array of length n, requestedServers) must be visited in the given order to handle customer workloads. The task is to determine the minimum time required to process all the requests, starting from server 1. Example m = 3 n = 4 transitionTime = [3, 2, 1] requestedServers = [1, 3, 3, 2] The pointer is initially at server 1, and the first server to be visited is number 1, hence it takes 0 seconds to visit it. To move from server 1 to 3, the path followed could be 1 → 2 → 3, which takes 3 + 2 = 5 seconds, or the path could be 1 &rarr

More Salesforce_4th june_on campus _iit guwahti OA questionsInterview experiences