Oracle MDC Coding challenge
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Clearing out instructions

Ir abajo

Clearing out instructions Empty Clearing out instructions

Mensaje por pedrogk Jue Nov 19, 2015 10:34 am

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.

pedrogk

Mensajes : 1
Fecha de inscripción : 19/11/2015

Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.