I think a lot of people treat best practice and clever as if they are the same thing. I think a lot of us don't have experience coding in a production environment so our concept of what "best practices" entails is nebulous at best.
Well this is efficient code and a one liner which aren't that easy to get for beginners. So that's why I think it's reasonable to vote "Best Practices"
One line - okay - but good luck giving that to a new engineer, or comparing it to the requirements in a code review, or for that matter remembering what you did three weeks from now. LOL
thats what comments are for.
amazing superstar code...hats off
No offense, but if I saw this in a PR, I'd immediately reject lol
best use of mathematics and logic! well done >>>
I think a lot of people treat best practice and clever as if they are the same thing. I think a lot of us don't have experience coding in a production environment so our concept of what "best practices" entails is nebulous at best.
this is what i wanted to see
Well this is efficient code and a one liner which aren't that easy to get for beginners. So that's why I think it's reasonable to vote "Best Practices"
Cool approach
One line - okay - but good luck giving that to a new engineer, or comparing it to the requirements in a code review, or for that matter remembering what you did three weeks from now. LOL
x can be subsituted with _ for an unused variable
Very clever but not best practice at all. It is not the easiest solution to understand. I do not know why some people vote it as "Best Practices".
This comment is hidden because it contains spoiler information about the solution
bruh
Very cool solution
i did it also in 1 line but little different lul
Loading more items...