LeetCode 967. Numbers With Same Consecutive Differences

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Hey great video! I really learned a lot from this! Just one quick question, I basically ran the exact same code as yours but my runtime was around 1000 ms whereas yours is like 90ms. I can't figure out what's causing the time difference. The only thing I did differently was that I initialized swap and noSwap up top when I first created them, instead of in the for loop. If you can take a look I can paste my code here. Thanks!

nathanx.