I
I
Igor Sokolov2016-08-31 13:11:45
Books
Igor Sokolov, 2016-08-31 13:11:45

Books for learning fundamentals and logic?

Hello! Now I went to an interview to get an internship. Initially, they knew that I did not know Python, but only read it for a week.
We decided to set tasks 2. They wanted to see how I would solve them.
1) Two hands on the clock. One for 12, the other is unknown. They are 45 degrees apart. Find what time it is.
2) Given a matrix. It has 4 columns and 4 rows. Numbers are unique. Suggest an algorithm for finding the number 55.
I said something hesitantly and the interview was actually finished.
And just walking down the street to work, I realized that for the clock you need to determine angles of 90 degrees, mark the time, then 45 degrees and then 15.
And for the matrix, you can find all numbers that are multiples of 5 and display the largest in the range from 1 to 60. For example.
What was it?) excitement and brain loss or what? Insecure knowledge? No base? Tell me what to read on:
1) Algorithms
2) Discrete mathematics
3) What else?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
I
iBird Rose, 2016-08-31
@iiiBird

what is the answer to the first question? Oo 6209c3a13745450d9199106965d2deff.png
I only see 4 states. but none of these states can exist. cannot be 13.5 hours 00 minutes or 22.5 hours 00 minutes. or 12 hours 7.5 minutes or 11 hours 52.5 minutes. because nowhere can the hand be exactly at 12 o'clock

V
Vadim Kozonogov, 2016-08-31
@platon23

I think you won't mind if I leave links to books: =)
forcoder.ru/about-coding/obektno-orientirovannoe-p...
forcoder.ru/about-coding/teoriya-i-praktika-yazyko...
forcoder.ru/ about-coding/informatika-uchebnik-dlya...
These books I read while studying at a technical school gave a good mastery of algorithms, logic and the basics of OOP.

V
Vladimir Martyanov, 2016-08-31
@vilgeforce

The first task is the school and the thinker. No algorithms here will help you if you do not see that there are 4 solutions and how to find them.

T
Tsimur_S, 2016-08-31
@Tsimur_S

For the first task, it was similar in the training interviews of the hexlet. In this case, everything is generally simple, 12 can be either hourly or minute, 45 degrees clockwise and counterclockwise. We take the clock in our hands and note all 4 situations. On the second I do not understand why you decide so? In any case, this will be worse than comparing each element of the matrix with 55. In the worst case, there will be N (in our case 16) operations. Have you accurately formulated the problem? For algorithms, read coremen, for Anderson's discrete mathematics. But for these two tasks, neither one nor the other is needed.

P
Philipp, 2016-08-31
@zoonman

Both tasks were on the logic, because. you were asked to find answers to simple questions.
You flunked the interview because thought about how you will pass it, and did not deal with solving problems.

S
Sergey, 2016-08-31
@DDanser

https://tproger.ru/problems/algorithm-to-search-an...
Found

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question