Fortinet Interview Report
- 0of 0 votes
Answer3 hour coding test.
- godzilla June 23, 2012 in Canada
Question 1: Delete an item in a linked list| Report Duplicate | Flag | PURGE
Fortinet Software Engineer / Developer C - 0of 0 votes
AnswersQuestion 3: Implement Base64 encoding API -
- godzilla June 23, 2012 in Canada
DESCRIPTION
Base64 processes input in 24bit chunks by converting each chunk into 4 bytes of output. It does so by splitting input into four 6bit groups and using these as indexes in the following substitution table -
const char base64_map[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
If an input is not a multiple of 3 bytes, it's padded with zeros. In this case the output bytes that consist entirely of the pad data are replaced with '='.
Example
An input of 0x00 0x45 0xF2 is equivalent to 00000000 01000101 11110010
bit sequence, which's then split into 000000 000100 010111 110010
and these are substituted to produce the following base64 encoding
'A' 'E' 'X' 'y'| Report Duplicate | Flag | PURGE
Fortinet Software Engineer / Developer - 0of 0 votes
AnswersQuestion 4: Maze Problem (Bonus)
- godzilla June 23, 2012 in Canada
Starting point is m[0][0], need to find a path go to m[9][9]. 0 means OK, 1 means cannot go there, boundary is 0 and 9, cannot go beyond boundary. Each step can be made horizontally or vertically for one more grid (diagonal
jump is not allowed).
Your program should print a series of grid coordinates that start from m[0][0]
and go to m[9][9]
Hint: No need to find the shortest path, only need to find one path that gets
you to desitination.| Report Duplicate | Flag | PURGE
Fortinet Software Engineer / Developer C