62 karma · joined March 28, 2024
Especially now that I have just bought an M4 mac
def formula(total_qs, terminating):
total = 1 << (total_qs - len(terminating))
for i, num in enumerate(terminating):
total += 1 << (num - i)
return total
print(formula(10, [1, 5]))```The formula is 2^(# of questions - # terminating questions) + SUM[2^(terminiating question number - idx in terminating question list] where the SUM is over all the terms in the list given as input to the question_paths function
for example: we take the example of question_paths(10,[1,5]), where the answer is 274. From the formula, we take 2^(10-2) + 2^(1-0) + 2^(5-1) which equals 274.
similarly for question_paths(10,[6,8]), where the answer is 448. From the formula, we take 2^(10-2) + 2^(6-0) + 2^(8-1) which equals 448.
1. I know many people on HN hate the idea of RTO, and for good reasons, but one downside I saw of remote was that junior engineers struggled to get mentorship and guidance as well as an in person setting. A lot of the learning junior engineers get is through water cooler talk, informal suggestions, and off the cuff comments, rather than stuff brought up in stand-ups or asynchronous slack messaging
2. Dell already seems to have a culture of trying to avoid promoting junior engineers quickly/for multiple years, through avenues such as the rotation program which ensure you don't get promoted for at least 2 years.