Sum of Values at Indices With K Set Bits - Leetcode 2859 - Solve with Sam in Python

preview_player
Показать описание
Bit manipulation is rife with off-by-one errors, so keep your wits! Follow along as I attempt today's leetcode question live and uncut! I explain my thought process and how I would communicate to a tech interviewer.

00:00 - Intro
2:05 - Start interview
3:38 - Restate problem and clarify assumptions
11:10 - Discuss approaches
15:30 - Start solve
18:46 - Discuss, check for errors
19:42 - Test on leetcode
21:15 - Extras - Alternatives, extensions etc.

_Note: Had a brain fart about inverse of 2^x, which is just log2(x), this usually won't both interviewers too much._

Рекомендации по теме
welcome to shbcf.ru