- PVSM.RU - https://www.pvsm.ru -
После некоторого перерыва, мы возобновляем выпуски ITренировки.
Предлагаю Вашему вниманию подборку интересных задач, встречающихся на собеседованиях в IT-компании — их регулярное решение позволит немного подготовиться к предстоящему собеседованию и просто держать себя в тонусе.
Ниже приведены вопросы и задачи для соискателей в Google, с различным уровнем сложности.
Question: How would you cut a rectangular cake into two equal pieces when a rectangular piece has already been cut out of it? The cut piece can be of any size and orientation. You are only allowed to make one straight cut.
How Strong is an Egg?
You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. What is the minimum number of tries needed to find out the solution?
Given 2 words, return true if second word has a substring that is also an anagram of word 1.
LGE, GOOGLE => True
GEO, GOOGLE => False
A city bus station information, example, bus No. 1 stops at abcd station, bus No. 2 stops at cefg station. Then a-d you only need to take No. 1, thus return 1, a-g is 2, because you need to transfer at station c,
Ask for a minimum bus you need to take to reach to another station. You can design any data structures.
Sub-Array with the Largest Sum
You are given an array with integers (both positive and negative) in any random order. Find the sub-array with the largest sum
Ответы будут даны в течение следующей недели — успейте решить. Удачи!
Автор: reci
Источник [1]
Сайт-источник PVSM.RU: https://www.pvsm.ru
Путь до страницы источника: https://www.pvsm.ru/programmirovanie/271404
Ссылки в тексте:
[1] Источник: https://habrahabr.ru/post/344788/?utm_campaign=344788
Нажмите здесь для печати.