-
-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syncing tests, filepaths, methdata and docs with problem-specificatio…
…n repocitory
- Loading branch information
1 parent
85652b5
commit 0f57713
Showing
17 changed files
with
204 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# Instructions | ||
|
||
Given a natural radicand, return its square root. | ||
Your task is to calculate the square root of a given number. | ||
|
||
Note that the term "radicand" refers to the number for which the root is to be determined. | ||
That is, it is the number under the root symbol. | ||
- Try to avoid using the pre-existing math libraries of your language. | ||
- As input you'll be given a positive whole number, i.e. 1, 2, 3, 4… | ||
- You are only required to handle cases where the result is a positive whole number. | ||
|
||
Check out the Wikipedia pages on [square root][square-root] and [methods of computing square roots][computing-square-roots]. | ||
Some potential approaches: | ||
|
||
Recall also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). | ||
- Linear or binary search for a number that gives the input number when squared. | ||
- Successive approximation using Newton's or Heron's method. | ||
- Calculating one digit at a time or one bit at a time. | ||
|
||
[square-root]: https://en.wikipedia.org/wiki/Square_root | ||
You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. | ||
|
||
[integer-square-root]: https://en.wikipedia.org/wiki/Integer_square_root | ||
[computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Introduction | ||
|
||
We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. | ||
|
||
As the first step in our calculation, we take a target number and find its square root (that is, the number that when multiplied by itself equals the target number). | ||
|
||
The journey will be very long. | ||
To make the batteries last as long as possible, we had to make our rocket's onboard computer very power efficient. | ||
Unfortunately that means that we can't rely on fancy math libraries and functions, as they use more power. | ||
Instead we want to implement our own square root calculation. |
Oops, something went wrong.