Clearing out instructions
Página 1 de 1.
Clearing out instructions
Given a list of movie names, overlap different movie names to generate the longest string you can. In order to include a movie name, the first word of it has to match the last word of another movie name. Each movie name can be used once at most.
For example, if you have the following list of movie names:
- How to Train your Dragon
- Gods and Monsters
- Dragon Ball Z: Battle of the Gods
- Monsters vs Aliens
- 8 Mile
Then a possible resulting string would be: "How to Train your Dragon Ball Z: Battle of the Gods and Monsters vs Aliens". In this case, we don't include 8 Mile in our string because its first and last words do not match the first and last words of any other movie name, therefore we can't overlap it.
For example, if you have the following list of movie names:
- How to Train your Dragon
- Gods and Monsters
- Dragon Ball Z: Battle of the Gods
- Monsters vs Aliens
- 8 Mile
Then a possible resulting string would be: "How to Train your Dragon Ball Z: Battle of the Gods and Monsters vs Aliens". In this case, we don't include 8 Mile in our string because its first and last words do not match the first and last words of any other movie name, therefore we can't overlap it.
pedrogk- Mensajes : 1
Fecha de inscripción : 19/11/2015
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.