LeetCode Fizz Buzz Solution Explained - Java

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


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

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

The dislike of this problem just shows how egotistical many programmers can be. They forget where they came from. They think they got better just by some magic. Everyone starts from small. Thank you for encouraging us my friend.

KaisarAnvar
Автор

@Nick, you are creating a lot of strings by not defining Fizz, Buzz and FizzBuzz as constants. Thats what interviewers may look for because the problem is simple.
Great work on all your videos and thank you so much.

mukundsridhar
Автор

This one toke my a bit, but I got there in the end. I kinda did this one on CodingBat rather than Leetcode but it's the same problem. But having a counter for 3, 5 and then reseting it is something I haven't even thought off, probably y the runtime is so low

heralds
Автор

Don't really need these temp variables and resets. You can just compare i % 3 and i % 5.

hobbit
Автор

I got a runtime of 98ms in JS. Is the equality operation faster? 1ms is something to envy for sure...

CST
Автор

awesome solution, without the use of Mod operator.

spandiar
Автор

Are you in a race please slow down and explain each step

dennisefranco
Автор

couldn't bitwise operators be used here?

whiteeyemovalik