challenges

my solutions to various "programming challenge" problems
git clone https://wehaveforgeathome.hates.computer/challenges.git
Log | Files | Refs | LICENSE

commit 93edb684480aa7a827054c1579c42a6d3a0d0b11
parent c17c618b5188332317882def69e6837184906f1c
Author: Ryan Wolf <rwolf@borderstylo.com>
Date:   Mon, 18 Oct 2010 09:28:55 -0700

to keep markdown from formatting the text

Diffstat:
Mgreplin/README.md | 96++++++++++++++++++++++++++++++++++++++++----------------------------------------
1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/greplin/README.md b/greplin/README.md @@ -1,77 +1,77 @@ -Source: http://challenge.greplin.com/ + Source: http://challenge.greplin.com/ -The Greplin Programming Challenge + The Greplin Programming Challenge -So it begins... + So it begins... ----------------------------------------- + ---------------------------------------- -Welcome to the Greplin Programming Challenge. You should try to complete all -three levels in a single sitting. It should take anywhere from 20 minutes to -2 hours. + Welcome to the Greplin Programming Challenge. You should try to complete all + three levels in a single sitting. It should take anywhere from 20 minutes to + 2 hours. -Level 1 + Level 1 ----------------------------------------- + ---------------------------------------- -Embedded in this block of text is the password for level 2. -The password is the longest substring that is the same in reverse. + Embedded in this block of text is the password for level 2. + The password is the longest substring that is the same in reverse. -As an example, if the input was "I like racecars that go fast" -the password would be "racecar". + As an example, if the input was "I like racecars that go fast" + the password would be "racecar". -Level 2 + Level 2 ----------------------------------------- + ---------------------------------------- -Congratulations. You have reached level 2. + Congratulations. You have reached level 2. -To get the password for level 3, write code to find the first prime -fibonacci number larger than a given minimum. For example, the first -prime fibonacci number larger than 10 is 13. + To get the password for level 3, write code to find the first prime + fibonacci number larger than a given minimum. For example, the first + prime fibonacci number larger than 10 is 13. -Step 1. Use your code to compute the smallest prime fibonacci number -greater than 227,000. Call this number X. + Step 1. Use your code to compute the smallest prime fibonacci number + greater than 227,000. Call this number X. -Step 2. The password for level 3 is the sum of prime divisors of X + 1. + Step 2. The password for level 3 is the sum of prime divisors of X + 1. -For the second portion of this task, note that for the number 12 we consider the -sum of the prime divisors to be 2 + 3 = 5. We do not include 2 twice even -though it divides 12 twice. + For the second portion of this task, note that for the number 12 we consider the + sum of the prime divisors to be 2 + 3 = 5. We do not include 2 twice even + though it divides 12 twice. -Level 3 + Level 3 ----------------------------------------- + ---------------------------------------- -Congratulations. You have reached the final level. + Congratulations. You have reached the final level. -For the final task, you must find all subsets of an array -where the largest number is the sum of the remaining numbers. -For example, for an input of: + For the final task, you must find all subsets of an array + where the largest number is the sum of the remaining numbers. + For example, for an input of: -(1, 2, 3, 4, 6) + (1, 2, 3, 4, 6) -the subsets would be + the subsets would be -1 + 2 = 3 -1 + 3 = 4 -2 + 4 = 6 -1 + 2 + 3 = 6 + 1 + 2 = 3 + 1 + 3 = 4 + 2 + 4 = 6 + 1 + 2 + 3 = 6 -Here is the list of numbers you should run your code on. -The password is the number of subsets. In the above case the -answer would be 4. + Here is the list of numbers you should run your code on. + The password is the number of subsets. In the above case the + answer would be 4. -The End + The End ----------------------------------------- + ---------------------------------------- -Congratulations. You completed the challenge. Your completion code is. + Congratulations. You completed the challenge. Your completion code is. -We'd love to talk to you - send your completion code, the code you wrote -during the challenge, and your resume to + We'd love to talk to you - send your completion code, the code you wrote + during the challenge, and your resume to -jobs+i+solved+the+challenge@greplin.com + jobs+i+solved+the+challenge@greplin.com -Even if you're not looking for a job, we'd love to hear what you thought -about the challenge. + Even if you're not looking for a job, we'd love to hear what you thought + about the challenge.