MIME Type puzzle discussion


#282

I wonder the same. Did you find a solution?


#283

So i did a hash table now. Since there was the tag “Hash Table” i figured it is in fact the way to go. I have now a problem with “Limite size in filenames” i dont even know what that means. Do they mean to check if the filename is to long? And what should i do if it is to long?


#284

Try to test your code with a filename of maximum allowed size.
This might lead to some problems with the end-of-string handling in C.


#285

Hi, I was puzzled over “Process has timed out” error in large dataset test case, and then noticed that I included list library that I don`t need. When I excluded extra library from my program, large dataset suddenly become passed. Can somebody explain why program was failed before, and then become passed after excluding unused library?


#286

I am stuck with this puzzle in the last test but not because of a timeout problem. It looks like the tests expect an extension when it should not. Here is the output I have generated to explain my problem:

filename : anotherfiletest.zip
	ext: zip
	mimetype: application/zip
application/zip
filename : thisisanotherfilename.longextens
	ext: longextens
	mimetype: UNKNOWN
UNKNOWN
filename : iLowerCaseAndUpperCaseLetters.
	ext: 
	mimetype: UNKNOWN
UNKNOWN
Failure
Found: UNKNOWN
Expected: image/jpeg

As you can see in the last iteration, the filename do not have any extension so the mimetype is ‘UNKNOWN’ but the test expect ‘image/jpeg’.

I can not see where I am wrong given that I pass all the other tests.


#287

I can’t find your data in the test.
The three filenames you provide appear in this order at the very end and the expected result is zip unknown unknown as your program returns.


#288

This puzzle is cool!


#289

Hi everyone
My algorithm passed test 1, 2 and 4
What’s asked in test 3 ?
What’s “correct division of the extension” ?

Thanks for your help


#290

it means that every one of the following should be identified as ext:
.ext
xxx.ext
xxx…ext
xxx…ext


#291

ok thanks, now i’have understood.