967. Numbers With Same Consecutive Differences - Day 3/30 Leetcode September Challenge

preview_player
Показать описание
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!

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

Were you able to resolve the same differences?

Algorithmist
Автор

On line 14 is enought to check last + k <= 9
and on line 16 0 <= last - k

To not use join and map an alternative is to use string instead of list as container for "current" variable

zicuioan
Автор

Why don't you have to define the ans list as "self.ans"? bc sometimes you are either doing that or using the nonlocal keyword, but here it seems to work without both

reactionchamber
Автор

Hey Larry, have you applied any special video filter/encoding to this video? Youtube is showing it as HDR

VarunMehrishi