Saltar al contenido principal

Un documento etiquetado con "priority-queue"

Ver Todas las Etiquetas

Last Stone Weight

This question is asked by Amazon. You are given a group of stones, all of which have a positive weight. At each turn, we select the heaviest two stones and smash them together. When smashing these two stones together, one of two things can happen: