r/dailyprogrammer • u/jnazario 2 0 • Mar 19 '17
Weekly #27 - Mini Challenges
So this week, let's do some mini challenges. Too small for an easy but great for a mini challenge. Here is your chance to post some good warm up mini challenges. How it works. Start a new main thread in here.
if you post a challenge, here's a template we've used before from /u/lengau for anyone wanting to post challenges (you can copy/paste this text rather than having to get the source):
**[CHALLENGE NAME]** - [CHALLENGE DESCRIPTION]
**Given:** [INPUT DESCRIPTION]
**Output:** [EXPECTED OUTPUT DESCRIPTION]
**Special:** [ANY POSSIBLE SPECIAL INSTRUCTIONS]
**Challenge input:** [SAMPLE INPUT]
If you want to solve a mini challenge you reply in that thread. Simple. Keep checking back all week as people will keep posting challenges and solve the ones you want.
Please check other mini challenges before posting one to avoid duplications within a certain reason.
17
u/jnazario 2 0 Mar 19 '17 edited Mar 19 '17
Roller Coaster Words
Given: A roller coaster word is a word with letters that alternate between going forward and backward in alphabet. One such word is "decriminalization". Can you find other examples of roller coaster words in the English dictionary?
Output: Your program should emit any and all roller coaster words it finds in a standard English language dictionary (or enable1.txt) longer than 4 letters. An example is "decriminalization".
6
u/Philboyd_Studge 0 1 Mar 20 '17 edited Mar 20 '17
Hamming Numbers - Helped someone with this in /r/learnprogramming recently. Hamming numbers, or Regular Numbers, or even Ugly numbers are numbers that have 2, 3, or 5 as the only prime factors. The first 20 Hamming numbers are
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36The 1500th Hamming number is
859963392Find the millionth Hamming number, with the constraint that you must calculate it in less than 3 seconds.
Given: no input
Output: The millionth Hamming number, and time elapsed < 3.0 secs
-2
u/mentionhelper Mar 19 '17
It looks you're trying to mention another user, which only works if it's done in the comments like this (otherwise they don't receive a notification):
I'm a bot. Bleep. Bloop. | Visit /r/mentionhelper for discussion/feedback | Want to be left alone? Reply to this message with "stop"