It's time to sum up the results of the competition, which was in the article " Programmers, go to interviews ". The conditions of the competition were as follows: give an example of the most unusual assignment that was in your interview. It's time to sum up the results of the competition and hold the final vote! Go!
Quest submitted by readers
We have selected, in our opinion, the most interesting tasks and you can evaluate them. We did not limit the number of examples, so some users gave several at once.
1. User with a nicknamejakushevbrought two tasks ( first and second ).
First task:
Well, I donβt know how interesting, but absolutely stupid task: βWrite 'Hellow, World!' Without a single ';' ". In C.Second task:
They still like this on "baremetal": There is a very simple controller with minimum RAM, for example, PIC16F873, it "sniffs" RS-485. A packet consisting of 32-bit numbers is transmitted over the interface. The format, beginning and end of the packet are known; it is known that each number is transmitted an even number of times. It is also known that the channel is 100% reliable. And the stream can be VERY long. But 1 number from the sample is transmitted an odd number of times. How to find it?2. User with nicknamenick758 gave the following problem:
The task from the interview. What will the program output? Solve without running. There are minor errors in the text so that it doesn't compile right away.3. An example from an interview from a userVolCh
The most addictive puzzle of this kind I've seen.
float bon_jovi[4][4]= { {0, 2, 0.5, 2}, {1, 3, 3 , 0}, {2, 0.5, 0, 1}, {0, 0, 0, 0} } #define FIRST_SONG 3 #define LAST_SONG 1 #define CD 0 #define ARTIST 1 void f(float *p, int jazz, int hiphop) { int high_rating=0; int low_rating=high_rating int music; float sum=0.0; for (music = jazz; music <= hiphop; music++) { sum += *(p++) if ( p[music]) high_rating++; else ++low_rating } p--; sum += *(--p) printf("%d %d %f", high_rating, low_rating, sum) } int main() { f(&bon_jovi[CD][ARTIST], LAST_SONG, FIRST_SONG) return 0; }
:
- simple PL interpreter (subset of pascal seems): variables, arithmetic,
- the task of detecting the desynchronization of clock generators of two computers with fictional (?) architecture and assembler with the simplest peer-to-peer grid, rather even a direct connection
- remote livecoding: write and raise a simple CRUD in symfony without generators in docker (I don't remember Docker was a condition or decided it myself)
- draw a rough model of the jira domain, draw a diagram of the services: servers, stores, queues, DBMS, etc.
4. Useriamdev95brought an entertaining puzzle :
There are two registers: R1 and R25. Comic (but quite real) task fromvadim_bv
There are two commands:
C1: R1: = K * R2 - R1
C2: R2: = K * R1 + R2
There is a target number N
Input: K, N, R1, R2
You need: print the minimum sequence from commands that allows you to get N in R1 or in R2 (in any of the two registers)
Or print nothing
It is known that K! = 0, R1! = R2, K, R1, R2 are natural numbers, N is an integer.
The problem from the Phystech joke "was solved by the entire department, but decided for the exam": Sort an 8-terabyte array of bytes.It is in your power to determine the winner! Vote for the most interesting interview assignment. According to the voting results, the winner will receive an interesting prize! We will summarize the voting results on Sunday, October 11th.