|
|
back to boardWA 7 Hashing i'm trying to solve this with hashing but i got wa on 7test.. i take max hash number 100000001.. is't possible that two different strings hash is equal? Re: WA 7 Hashing Posted by AterLux 25 Apr 2011 13:52 of course it possible that different data has equal hash. for example, if you calculating hash by simple adding char codes, then strings "abc" and "cba" and "acb" etc. - will have equals hash. But if you're lucky enough and chosen good hash formula, all tests can be passed, even though youre solution actually will be wrong and may give wrong answers on special (designed to your hash formula) tests. Re: WA 7 Hashing thanks, my formula was absolutly correct, there was some mistake in comparing to other hashes :) |
|
|