queue reconstruction by height solution