Nodes in complete binary tree (Python interview)

preview_player
Показать описание
Watch someone try to solve the Nodes in a complete Binary Tree problem in Python with an Amazon engineer. This is a mock interview - see if they can find the solution!

TIMESTAMPS
00:00 Intro
03:15 Double an array
17:05 Return the shortest edge of the squares that fit in the given rectangles
38:50 Given a complete binary tree, return the count of all the nodes in the tree
Рекомендации по теме
Комментарии
Автор

The interviewer doesn't even spot the errors lol.
1st problem: in python you can't simply index an empty array.

2nd problem: the if and elif statement check for the same condition. Additionally both paths compare rect[0] to maxVal instead of rect[1] in one and rect[0] in the other


didn't watch the 3rd problem yet

Paloma
Автор

num=[1, 4, 5, 7, 2, 3]
ans=[num[i%len(num)] for i in range(len(num)*2)]

daminehrostami
Автор

Actually the solution to the first problem is not working

VladBurlutsky
Автор

where are they drawing? unable to see anything lol. Whats the point of recording anyway? use a better recorder lol

blasttrash