Available question text
Find the lexicographically smallest permutation that maximizes information gain for a given array. Information gain is calculated as the sum of i * data[p[i]] for a permutation p of integers 1 to n.
Related questions
Continue with questions that share topics or the same question type.
- Find the Lexicographically Smallest Valid Sequence
Coding
- Find Balanced Numbers in a Permutation
Coding
- Find K Pairs with Smallest Sums
Coding · Array · Heap (Priority Queue)
- Find K-th Smallest Pair Distance
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Find Lexicographically Smallest Permutation Maximizing Information Gain
Reported Jan 20, 2025 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source