Skip to content
Get started

Nodes fixed by a group reversal

A list of n=15n = 15 nodes, numbered 11 through 1515 in their starting order, is reversed in consecutive groups of k=3k = 3 (reverse nodes 11–33, then 44–66, and so on; 1515 divides evenly into 55 groups). After the reversal, how many nodes remain in the same position they started in?

Show hints (2)+
  1. Reversing an odd-length block leaves its middle element in place.
  2. Count the blocks (15/315/3), then one fixed node per odd block.

Answer

Reveal answer →

5

Create a free account to see the full worked solution and track your progress.

Interview format: Hedge Fund Quant, Trading Aptitude Tests

Related questions