qiyuangong / leetcode

Python & JAVA Solutions for Leetcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

removeNthFromEnd

py0922 opened this issue · comments

if len(linklist)<n there is error

Yes. In real world application, we should handle this. But, this question has a condition in description, i.e., Given n will always be valid.

So, we don't have to check n. :)