New FAMILUG

The PyMiers

Friday 25 July 2014

Chào! trello.com

Lâu lắm mới thò tay vào code giải đố, cảm giác ngu si stupid dâng trào.

Trello.com mới tách thành công ty riêng và đang tuyển nhiều vị trí bao gồm cả developer (làm remote ok).
Đề bài:

https://trello.com/jobs/developer

Find a 9 letter string of characters that contains only letters from
acdegilmnoprstuw
such that the hash(the_string) is
910897038977002
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".)

Bài này theo đánh giá cá nhân là một bài toán rất bình thường nên trello.com chỉ dùng để kiểm tra xem ứng viên có biết code hay không chứ không kiểm tra gì khác.

Lời giải bằng python:

https://github.com/familug/FAMILUG/blob/master/Python/trello.py

Vậy là mình biết code, dia \m/
Và nếu như các anh trello.com chỉ tuyển mỗi vòng làm bài này thì ngày mai mình đã là developer @trello.com :)) dia dia dia :3

Hãy bàn luận về lời giải và các vấn đề bạn muốn ở phần comment :D

1 comment:

  1. Ko ai bình luận, comment cho Hưng đỡ tủi ;))

    ReplyDelete