Solve order-statistics and XOR-triplet problems | Google Interview Question