fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles * fix: added 3 dashes line before prob expl * fix: added 3 dashes line before hints * fix: added 3 dashes line before solutions
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
---
|
||||
title: Sum square difference
|
||||
---
|
||||
## Problem 6: Sum square difference
|
||||
# Problem 6: Sum square difference
|
||||
|
||||
### Method:
|
||||
---
|
||||
## Problem Explanation
|
||||
- Sum of first n natural numbers can be calculated by using this formula:
|
||||
- 
|
||||
|
||||
@@ -12,7 +13,11 @@ title: Sum square difference
|
||||
|
||||
- We can calculate the values using the above formula and subtract them to get the result.
|
||||
|
||||
### Solution:
|
||||
|
||||
---
|
||||
## Solutions
|
||||
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
||||
|
||||
```js
|
||||
function sumSquareDifference(n) {
|
||||
const sumOfN = (n*(n+1))/2;
|
||||
@@ -23,7 +28,9 @@ function sumSquareDifference(n) {
|
||||
}
|
||||
```
|
||||
|
||||
### References:
|
||||
#### Relevant Links
|
||||
|
||||
- [Sum of n numbers - Wikipedia](https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF)
|
||||
- [Sum of n square numbers - Wikipedia](https://en.wikipedia.org/wiki/Square_pyramidal_number)
|
||||
|
||||
</details>
|
Reference in New Issue
Block a user