Commit Graph

13 Commits (569bd7c3a770edb14df38af93cfedd1ba6d56508)

Author SHA1 Message Date
Bill Sourour f0eb384b10 Smallest Common Multiple – Optimized Advanced Solution (#19572)
* Optimized advanced solution

Made 2 minor improvement to the advanced solution:

1. The original advanced solution used `Math.max` and `Math.min` against the supplied array, this causes the values in the supplied array to be compared twice. If we use sort instead, the values are only compared once and we can target the max and min values using an index. This is more efficient.

2. The original solution caused `lcm(min, min + 1)` to be evaluated twice. By incrementing `min` the first time we run `lcm` we avoid this duplication and also by taking advantage of the prefix increment operator ++ in the while loop, we trim a line.

* Fixed extra spaces in code block

* Incorporated code feedback from #19572

Made the following changes to the advanced code solution:

- Converted helper functions to arrow function constants
- Simplified comments
- Used destructuring and `sort` for `min` and `max`

* Fixed spacing.
2018-10-18 10:08:45 -07:00
The Coding Aviator 4a6d1b49ff Update index.md (#19715) 2018-10-18 15:48:05 +05:30
greggubarev de5ef2fa9f Responsive Web Design: Added hint to Inherit Styles from the Body Ele… (#19631)
* Responsive Web Design: Added hint to Inherit Styles from the Body Element

Added hint to Inherit Styles from the Body Element (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/inherit-styles-from-the-body-element)

* Added Full solution
2018-10-17 13:51:38 -07:00
The Coding Aviator 599b0ccdda Added solution to Add a Hover Effect to a D3 Element (#19606)
* Update index.md

* Update index.md
2018-10-17 22:12:38 +05:30
The Coding Aviator 28eb17914a Added D3 solution (#19607)
* Update index.md

* Update index.md
2018-10-17 22:05:20 +05:30
The Coding Aviator f46e517eb7 Added D3 solution to scatterplot challenge (#19609)
* Update index.md

* Update index.md
2018-10-17 22:04:35 +05:30
The Coding Aviator 68697c0009 Added D3 solution (#19604)
* Update index.md

* Update index.md
2018-10-17 22:03:24 +05:30
Adrian Skar a01cc367e0 [Guide] Basic JS: Random numbers within range. Enhancements (#19539)
* [Guide] Basic JS: Random numbers within range. Enhancements

Added code solution, explanation, resources and other minor fixes.

* Additional fix; list.

* update: created ordered list of calculation
2018-10-17 09:31:27 -07:00
greggubarev 2d1e125087 Responsive Web Design: Added hint to Change the Font Size of an Element (#19603)
Added hint to Change the Font Size of an Element (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/change-the-font-size-of-an-element)
2018-10-17 16:51:37 +05:30
greggubarev a5840c96d9 Responsive Web Design: Added hint to Create a Custom CSS Variable (#19605)
Added hint to Create a Custom CSS Variable (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/create-a-custom-css-variable)
2018-10-17 16:47:39 +05:30
Niccolo Lampa 35e2800af7 Added hints and solutions to Redux exercises (#19576)
* added hints and solutions to exercise

* added hints and solutions to problem
2018-10-16 23:52:48 -07:00
The Coding Aviator 40a1b43e75 Update index.md (#19571) 2018-10-16 21:10:23 -07:00
Mrugesh Mohapatra da0df12ab7 fix(guide): simplify directory structure 2018-10-16 21:32:40 +05:30