Within Amazon’s vast fulfillment system, there exist n distinct inventory tasks, each operated by bots[i] bots. These tasks compete, leading to conflict rounds every minute where two random tasks are chosen.
During each conflict:
This sequence continues until only one inventory task remains active.
Your objective is to determine which of these tasks have a chance to survive as the final remaining task in at least one possible sequence of events.
Return the 1-based indices of all such tasks, and also please sort it in ascending order 📈.
p.s. if you are applying for a L5 position, you may not want to miss this question..🤧
Gooood news! We might found the shoe selling question: Selling Shoes
The second question in the same batch..Will update once find reliable source..like always~~
n = 5 bots = [1, 6, 2, 7, 2] return = [2, 4]
- Count Promotional PeriodsOA · Seen Jun 2026
- Find Maximum Total Amount (SDE I, Fungible :)Seen Jun 2026
- Get Minimum AmountOA · Seen Jun 2026
- Find Minimum CostOA · Seen Jun 2026
- Get Smallest Base SegmentOA · Seen Jun 2026
- Select Least Resource TasksOA · Seen Jun 2026
- Product Category Group SizesPHONE SCREEN · Seen May 2026
- Count Connected ComponentsPHONE SCREEN · Seen May 2026
public int[] inventoryProcessesSurvivalPossibility(int n, int[] robots) {
// write your code here
}