Problem to solve daily programming challenges. (Programing language is C#)
- top level class: internal
- method: private
- members (unless an interface or enum): private (including nested classes)
- members (of interface or enum): public
- constructor: private (note that if no constructor is explicitly defined, a public default constructor will be automatically defined)
- delegate: internal
- interface: internal
- explicitly implemented interface member: public
Properties of Addition of Natural Numbers:
- Sum of 1st ‘n’ Natural numbers = 1 + 2 + 3 + …. + n = n(n+1)2
- Sum of squares of 1st ‘n’ natural number = 1^2 + 2^2 + 3^2 + ….. + n^2 = n(n+1)(2n+1)^6
- Sum of cubes of 1st ‘n’ Natural number = 1^3 + 2^3 + 3^3 + ….. + n^3 = (n(n+1)2)^2
- Sum of 1st ‘n’ Odd natural number = 1+ 3 + 5 + ….. + (2n – 1) = n^2
- Sum of 1st ‘n’ even natural numbers = 2 + 4 + 6+ …….2n = n (n+1)
- Sum of squares of 1st ‘n’ Odd natural number = 12 + 32 + 52 + ….. + (2n – 1) 2 = n(2n−1)(2n+1)3
- Sum of squares of 1st ‘n’ Even natural number = 22 + 42 + 62 + ….. + (2n)2 = 2n(n+1)(2n+1)3
- Sum of cubes of 1st ‘n’ Odd natural number = 13 + 33 + 53 + ….. + (2n -1)3 = n2 (2n2 -1)
- Sum of cubes of 1st ‘n’ Even natural number = 23 + 43 + 63 + ….. + (2n)3 = 2 [n (n + 1)]2
- Sprial Matrix Example https://github.com/hraverkar/Coding_Problem/blob/master/SpiralMatrix.cs
- Fibonacci Series using for loop and recursion function https://github.com/hraverkar/Coding_Problem/blob/master/FibbonacciSeries.cs