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

Real BUG found and more questions.

3 participantes

Ir abajo

Real BUG found and more questions. Empty Real BUG found and more questions.

Mensaje por chess1424 Mar Ene 05, 2016 11:19 pm

Finally I got accepted in the status of my last submission. With that I found that the online judge doesn't recognize the time limit exceeded of a program. I found it because I wrote a code like this.

while(true)
{
//inifinitive loop
}

and the answer of the online judge was wrong answer, but the real answer is time limit exceeded, with that I found some special cases where my code was in a inititive loop. Finally I fixed it and got the score.

Now my questions is. What are the real instructions for the problem ?

My current solution is just taking the entire overlaping of last word with the first word. as the example.

- My mother is beautiful
- beautiful girl
- girl eat ice cream
- cream for

output: My mother is beautiful girl eat ice cream for

Then you said to us that a bug was found and partial overlaping is allowed. So I wrote a program with partial overlaping like this.

Example:

-hhotisi love story
-you don't know what you're doin'
-1234 is the number wh

output: 1234 is the number whhotisi love storyou don't know what you're doin'

"Because at least the last character of the last word is overlaping with the first character of the first word and as this way you get the longest string"

Explanation...

sentence 1: aaaa bbbb ccc dddd 12345
sentence 2: 6789 aaa bbb ccc ddd

The condition is: The last character (character 5) is equal to the first character of first word from sentence 2 (character 6) or characters 45 are the same as characters 67 or character 345 are the same as characters 678 and so on...

With this implementations I got a solution of 122877 characters. But I can't submit my solution, I'm getting wrong answer. Now I think the real statement is...


Partial overlaping is considered if and only if. the last word is a entire overlaping of the first word or vice versa. for example:

-hhotisi love story
-you don't know what you're doin'
-storyesttes are the most awful

output: hhotisi love storyou don't know what you're doin' (INCORRECT).

Because the last word is not an entire overlaping of the first and vice versa.

ouput: hhotisi love storyesttes are the most awful (CORRECT).

Because the first word (storyesttes) is an entire overlaping of the last word (story).


It is true ?. Please tell me what is the real statement and if it is true. If not, How can I validate my solution of 122877 characters.
Thanks =D.

chess1424

Mensajes : 6
Fecha de inscripción : 04/01/2016

Volver arriba Ir abajo

Real BUG found and more questions. Empty Re: Real BUG found and more questions.

Mensaje por erikpeterson Miér Ene 06, 2016 10:33 pm

Thank you for finding this bug.   I'm the guy sponsoring the contest from within Oracle.

As you state partial overlapping is considered if and only if the last word is a entire overlapping of the first word or vice versa.

Your examples are spot on
output: hhotisi love storyou don't know what you're doin' (INCORRECT).

ouput: hhotisi love storyesttes are the most awful (CORRECT).

We will see if we can update our validator to catch this but do reserve the right to eliminate examples manually

Regards,
Erik Peterson
General Manager, Oracle Mexico Development Center

erikpeterson

Mensajes : 25
Fecha de inscripción : 06/01/2016

Volver arriba Ir abajo

Real BUG found and more questions. Empty Re: Real BUG found and more questions.

Mensaje por masp Jue Ene 07, 2016 2:07 pm

There are plenty more problems with the online string validator. Would be great to see the code because I've been applying reverse engineering to figure out what are we allow to do. In other words, which are the precise set of rules for this challenge?!

I have seen several issues:
- This partial overlapping is only applied in one direction title1 -> title2 but not vice versa. It is also applied to entire words, but what are entire words? As far as I have tested, the whitespace is only separator between words.

- It is not possible to use entries from the dataset that have the same title, for instance: <12 years a slave>, is repeated. The validator says it is invalid. What should it be? Should I remove repeated entries?

- What happen with titles that are sub-stings of other titles?

I did a validator based on the graph I build from the restrictions I have manage to figure out testing the online tool; this validator works fine. I think the online validator should be done taking this into consideration.

PS: Would be great to receive feedback from the online validator regarding why an uploaded string is not valid.

masp

Mensajes : 15
Fecha de inscripción : 07/01/2016

Volver arriba Ir abajo

Real BUG found and more questions. Empty Re: Real BUG found and more questions.

Mensaje por erikpeterson Jue Ene 07, 2016 10:51 pm

MASP:
Thanks for your questions and suggestions.

A few of your questions answered.
1. Separator.   whitespace is only separator between words.
2. Repeated Movie Names.  
This should work as long as they are 2 entries like you state.  
Please send me your string that connects two.   Will use it as a test case and fix.
For background the checker is built in PL/SQL (so it could easily integrate for the first online site built in APEX).   We store each move as a row in a table.    When you use one, I only mark one.
3. Substrings.    See 2 above.   Should be a usable option for other connections.
4. Partial Overlapping.  This was originally a "bug" we decided to support as they where some valid seeming cases, especially those with an '   (i.e. Widow vs Widow's) and it seemed interesting.

Send me your checker.  Would be interested to see it.  erik.peterson[at]oracle.com

erikpeterson

Mensajes : 25
Fecha de inscripción : 06/01/2016

Volver arriba Ir abajo

Real BUG found and more questions. Empty Re: Real BUG found and more questions.

Mensaje por erikpeterson Vie Ene 08, 2016 7:06 am

One other item to mention. As stated in the original problem, we do allow multiple word overlap

so if we have
sentence 1: aaa bbb ccc
sentence 2: bbb ccc ddd eee

aaa bbb ccc ddd eee is a valid output

erikpeterson

Mensajes : 25
Fecha de inscripción : 06/01/2016

Volver arriba Ir abajo

Real BUG found and more questions. Empty Re: Real BUG found and more questions.

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba


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