Autoscale Policy Utilization Check Amazon OA 2023

Autoscale Policy Utilization Check Amazon Online Assessment

Autoscale Policy Utilization Check Solution A scaling computing system checks its average utilization every second while it monitors. It implements an autoscale policy to increase or reduce instances depending on the current load as described below. Once an action of increasing or reducing the number of instances is performed, the system will stop monitoring for … Read more

Design Movie Rental System Solution

Design Movie Rental System Solution You have a movie renting company consisting of n shops. You want to implement a renting system that supports searching for, booking, and returning movies. The system should also support generating a report of the currently rented movies. Each movie is given as a 2D integer array entries where entries[i] = [shopi, moviei, pricei] indicates that … Read more

Maximum Alternating Subsequence Sum

Maximum Alternating Subsequence Sum Solution The alternating sum of a 0-indexed array is defined as the sum of the elements at even indices minus the sum of the elements at odd indices. For example, the alternating sum of [4,2,5,3] is (4 + 5) – (2 + 3) = 4. Given an array nums, return the maximum alternating sum of any subsequence of nums (after reindexing the elements of the subsequence). A subsequence of an array is a new array generated from the … Read more

Remove All Occurrences of a Substring Solution

Remove All Occurrences of a Substring Given two strings s and part, perform the following operation on s until all occurrences of the substring part are removed: Find the leftmost occurrence of the substring part and remove it from s. Return s after removing all occurrences of part. A substring is a contiguous sequence of characters in a string. Example 1: Input: s = “daabcbaabcbc”, part = “abc”Output: “dab”Explanation: The following operations are done: Example 2: … Read more