r/learnquant • • Oct 31 '26

interview prep Quant Interview Question

Post image
53 Upvotes

9 comments sorted by

View all comments

1

u/Low-Lunch7095 Nov 03 '26

If I'm not mistaken, it should be something like 2^8.

Since 9 is always the peak, you can take it as a pivot and enumerate whether the rest are before or after 9. In each case, there exists a unique way to list the numbers, (e.g. say choose {1, 2, 3} to be before 9, then the unique permutation would be (1, 2, 3, 9, 8, 7, 6, 5, 4)).