r/badcode • • Jan 13 '23

java Friend asked me why LeetCode wouldn't accept this...

Post image
584 Upvotes

133 comments sorted by

View all comments

Show parent comment

3

u/[deleted] Jan 13 '23

[removed] — view removed comment

-1

u/benton_bash Jan 13 '23

What if there are no duplicates?

2

u/[deleted] Jan 13 '23

[removed] — view removed comment

-3

u/benton_bash Jan 13 '23

Curious I got such different results with python. I refuse to procrastinate further with this tho.

Thanks for the distraction : )