7 kyu
Reduce My Fraction
1,614 of 4,498SavageWilliam
Description:
Write a function which reduces fractions to their simplest form! Fractions will be presented as an array/tuple (depending on the language) of strictly positive integers, and the reduced fraction must be returned as an array/tuple:
input: [numerator, denominator]
output: [reduced numerator, reduced denominator]
example: [45, 120] --> [3, 8]
All numerators and denominators will be positive integers.
Note: This is an introductory Kata for a series... coming soon!
Fundamentals
Recursion
Algorithms
Similar Kata:
Stats:
Created | Jun 17, 2016 |
Published | Jun 17, 2016 |
Warriors Trained | 9216 |
Total Skips | 297 |
Total Code Submissions | 11930 |
Total Times Completed | 4498 |
JavaScript Completions | 1614 |
Python Completions | 1816 |
Ruby Completions | 209 |
Rust Completions | 128 |
Go Completions | 188 |
Java Completions | 383 |
Scala Completions | 15 |
CoffeeScript Completions | 9 |
SQL Completions | 268 |
C Completions | 62 |
Total Stars | 122 |
% of votes with a positive feedback rating | 89% of 501 |
Total "Very Satisfied" Votes | 414 |
Total "Somewhat Satisfied" Votes | 66 |
Total "Not Satisfied" Votes | 21 |