Как-то в Trello решили нанять фронтендщика и натвитили base64-urlencode строчку, которая при раскодировании вела на страницу с прекрасной задачкой. Задачку, как и страницу, похоже, уже выпилили, но у меня сохранилась.
Write code to find a 7 letter string of characters that contains only letters from
acdegilmnoprstuw
such that the hash(the_string) is
675202166929
if hash is defined by the following pseudo-code:
Int64 hash (String s) {
Int64 h = 7
String letters = "acdegilmnoprstuw"
for(Int32 i = 0; i < s.length; i++) {
h = (h * 37 + letters.indexOf(s[i]))
}
return h
}
For example, if we were trying to find the 7 letter string where hash(the_string) was 680131659347, the answer would be "leepadg".
Ответ надо было прислать в subject письма HR-у. Первых сколько-то человек получали возможность пообщаться.
Как по мне, поход просто замечательный.


