LeetCode 268: Missing Number. My math degree paid off!! #python #coding #programming

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

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

I love solutions to problems like these where a simple math trick can save so much potential computing power. I'd love to see more!

Akjjf
Автор

Elegant. Not a programmer, so I would have created an array of booleans and then looped through the list and flipped each member of the array to true when the corresponding number was found, followed by looping through the array to find the remaining false. I would have wasted so many processor cycles haha

John_Jack
welcome to shbcf.ru