Ad
  • Custom User Avatar

    I don't think it's the best solution from programming point of view.

    Actually, it is. There's a reason why every IT student has to take math classes. Try to understand Machine Learning without Statistics, or Image Processing without Analysis, or Computer Graphics without Linear Algebra. Without at least some basic maths, you'll be lost as soon as your solution doesn't work, or when you have to implement something non-standard.

  • Custom User Avatar

    Is n't nnn faster because it isn't calling the power function? But I'm not sure at all

  • Custom User Avatar

    In fact, this is the best kind of solutions everyone should write in their programs. There nothing more fast, optimal and simple than this.