Codewars Kata - Maths Trumps Computer Science

Channel:
Subscribers:
686
Published on ● Video Link: https://www.youtube.com/watch?v=vqUIVVsf8_0



Duration: 28:43
20 views
0


I always think Computer Science is really a specialism of maths (Turing was first and foremost a mathematician) and this problem illustrates how the 'mathematical' approach trumps the 'computational' approach.

-- Watch live at https://www.twitch.tv/retrojimmyx

0:00 Defining the problem
3:24 Find the number of digits that make up a triangle with n rows
10:00 Formula to find the first n odd numbers starting form 1
14:25 Refactoring code
19:19 Simplifying the equation
27:14 The answer







Tags:
games
twitch