Speak of the devil ;) I actually finished recording the video recently! I have some other videos in the pipeline, but once I'm finished editing it I'll bump it up in the queue, ie it'll be public within the next 2-3 days :) What a fun problem by the way, thanks for sharing it!
Hey! Let me know if I misunderstood you, but I think we need to check for 0 because the question rules are find two indices i and j, and specifically i != j , that satisfies arr[i] == 2 * arr[j] if we didn't have a special check for 0, then given an array with a single 0 arr = [0] and we've filled our dictionary d = {index 0: value 0} b = arr[i] = 0 a = 2*b = 2*0 = 0 so a == b as 0 == 0, so (a in dictionary, ie arr[i] == 2*arr[j] ) comes to true, so the algorithm would return True for arr = [0], which is incorrect by the rules because i == j in this case. As a result, we need a special check that the index of the value in the dictionary 'j' is not equal to idx 'i', hence the (d[a] != idx). If there's a trick here I'm missing let me know!