Leetcode 7 - Reverse Integer JavaScript

preview_player
Показать описание
Leetcode 7 asks us to reverse an integer x. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then we must return 0. In this video I show you the "standard way" most developers will use to reverse an integer. This involves transforming the number to an array, then reversing that array. Finally, I show you the optimized solution, which involves using math operations to reverse an integer. You definitely want to see this!

Chapters:
0:00 Intro
1:03 Converting Number to String Solution
16:24 Reversing a Number using Math
22:04 Outro
Рекомендации по теме
visit shbcf.ru