AWS provides scalable systems. A set of n servers are used for horizontally scaling an application. The goal is to have the computational power of the s…
1. Heap Operations Complexity A heap is a special type of binary tree in which every parent node is less than or equal to its child node(s) (min-heap) o…
String Patterns Given the length of a word wordLen and the maximum number of consecutive vowels it can contain maxVowels , determine how many unique wor…
Data scientists at Amazon are working on a logistics optimization tool to arrange delivery routes based on existing route patterns. A prototype algorith…
Calculus – Integration – Fixed Compute the integral ∫ from -π to π of (3 + 2 sin x + 3 cos x)(1 + 4 sin x) dx Pick ONE option: 7π 8π 14π 16π 这道题考察定积分与三角…
Amazon OA: Minimum Boxes to Unload The supply chain manager at one of Amazon’s warehouses is shipping the last container of the day. All n boxes have be…
Write a function dirReduc that takes an array of strings and returns a string array. The returned array should have all unnecessary directions removed,…
You are given a string chatMessage . Your task is to count the number of substrings of exactly length 3 that contain at least one vowel ( a , e , i , o…
Given an array of integers and an integer k , determine the length of the longest valid subsequence in the array. A subsequence is formed by removing ze…
1. Network Sockets Consider two pseudo-code snippets illustrating file transfer mechanisms between a client and a server. Pseudo-code 1 Client: file = o…
1. Handling High Concurrency in Web Server Your web server at TikTok needs to handle a high number of concurrent connections efficiently. Which server a…
The manager of the Amazon warehouse has decided to make changes to the inventory. Currently, the inventory has n products, where the quality of the i -t…
Given a binary rectangular matrix, find the minimum number of steps from a given source to a given destination. The path can only be constructed out of…
Given an array watch_history of size n , that represents the web series watched by a viewer over a period of days, and two integers, series1 and series2…
You are given datasets containing information about taxi drivers and their rides. Your task is to perform some basic data analysis and save the results…
Amazon is developing a regex matching library for NLP use cases. A prototype regex matching implementation has the following requirements: The regex exp…
Level 1 The basic level of the in-memory database contains records. Each record can be accessed with a unique identifier key of string type. A record ma…
Amazon’s database doesn’t support very large numbers, and hence, numbers are stored as a string of binary characters, ‘0’ and ‘1’ . Accidentally, a ‘!’…
Implement the Least Recently Used (LRU) and First In First Out (FIFO) cache eviction policies, respectively. Pick ONE OR MORE options. // LRU cache = Li…