*Don't forget to use Git to save your projects!*

By now you should feel pretty good working with strings, arrays and hashes. We'll do a couple of classic "intro to programming" problems here to help solidify your knowledge and get warmed up to working on small projects. You'll need to rely on some of your basic knowledge of conditionals and flow control from the prep work but you shouldn't need to do anything you haven't seen before.

You can do these in IRB or create a separate script file to run from the command line if you know how to do that (we'll cover it in the next few sections).

*Note: If you want to actually write and run your own Ruby code, you can either use IRB from the command line (type irb after the prompt), or run it from a script file using $ ruby ./your_file_name_in_the_current_directory.rb, or use the online editor at repl.it.*

Build the simple User Input Word Counter tutorial from Codecademy.

From Wikipedia:

In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.

There's a brief video about it from Harvard's CS50 class.

Implement a caesar cipher that takes in a string and the shift factor and then outputs the modified string:

```
> caesar_cipher("What a string!", 5)
=> "Bmfy f xywnsl!"
```

**Quick Tips:**

- You will need to remember how to convert a string into a number.
- Don't forget to wrap from
`z`

to`a`

. - Don't forget to keep the same case.

*Submit a link to the github repo with your files in it here with a pull request. Please include your partner's github handle somewhere in the description if they would like attribution.*

- Add your solution below this line!
- Ben Deltenre's solution
- justinckim3's solution
- GuyInaLabCoat's solution
- Kasey Z.'s solution
- junkdeck's solution
- tfantina's solution
- Demo318's solution
- Dallaire's solution
- zulixro's solution
- SadieD's solution
- Aadesh's solution
- Grey-Ghost's solution
- Aaron's solution
- xavier solution
- Webdev-burd's solution
- Arron's solution
- BenBrewerBowman's solution
- jfonz412's solution
- Jason Epstein's solution
- dfan14051's solution
- Oleh Sliusar's solution
- Orlando's solution
- RichJDSmith's solution
- thehgall's solution
- Ovsjah Schweinefresser's solution
- John Phelps's solution
- Sean Friedman's
- Jib's Solution
- Chad Kreutzer's solution
- Josh Vogel's solution
- Austin Norman's solution
- ctcyu's solution
- ThusStyles's solution
- Sessl's solution
- Eugyev's solution
- Atharva Karandikar's solution
- NoRest4AWhearry's solution
- Jamie's solution
- Angel Vargas's solution
- Anh Le's solution
- Afshin M. (afshinator)'s solution
- brianllamar's solution
- Alan Russell's solution
- Marina Sergeyeva's solution
- Donald's solution
- Sahil's solution
- Mark W's solution
- Toxox's solution
- TomTom's solution
- Tommy Noe's solution
- Steve Mitchell's solution
- Michael Alexander's solution
- Adrian Badarau's solution
- James MacIvor's solution
- Gabriel Matos de Souza's solution
- Maggie Baker's solution
- Hyeunjoon Kim's solution
- Aleksandar Rodić's solution
- Lara Finnegan's solution
- John Quarles's solution
- Vidul's solution
- Tomislav Mikulin's solution
- Artur Janik's solution
- Kate McFaul's solution
- Chris Dziewa's solution
- Dominik Stodolny's solution
- Andy Linteau's solution
- Josh Naughton's solution
- Jason Matthews's solution
- Kevin Weir's solution
- chasmani's solution
- Kevin Mulhern's solution
- Emil Johansen's solution
- Sasikala's solution
- Sam Padrul's solution
- LongPotato's solution
- Eleanor's solution
- Dorian Iacobescu's solution
- Nathan Bourke's solution
- Lyman Wong's solution
- Antonio Augusto's solution
- omokoro's solution
- Ryan Jordan's solution
- Tom McGinn's solution
- Eddie's solution
- Gitman's solution
- Suneil's solution
- Jeremy Mauzy's solution
- Richard Stewart's solution
- Josh Klein's solution
- Pedro Amaral's solution
- Tom Wu's Solution
- Diarmuid Murphy's solution
- Dan Hoying's solution
- ll14m4n's solution
- AtActionParks's solution
- Matias Pan's solution
- Mark Viola's solution
- Glenn Crosby's solution
- Bhupendra Singh's solution
- Joe Balsamo's solution
- Gb69010p's solution
- Cody Gipson's solution
- Racotek's solution
- M. Edgar Joel's solution
- Miguel Oliveira's solution
- WCope's soultion
- John Tobillo's solution
- Alex Chen's solution
- Aleksandre Clapin-Pepin's solution
- AnthonyL's solution
- Jason Mattingly's solution
- Angus Dobson's solution
- Dylan Bailey's solution
- Julie Anderson's solution
- Ellen Sun's solution
- Alex Tsiras' solution
- Panashe Fundira's solution
- Paweł Cichoń solution
- Noah Prescott's solution
- Aviv Levinsky's solution
- Florian Mainguy's solution
- Scott Bobbitt's solution
- Wayne Ho's solution
- Chris Swanson's solution
- Maciej Panasiewicz's solution
- Simon Kraus' solution
- djhart's solution
- Theoderik Trajanson's solution
- simoncal's solution
- Giorgos Mitsis's solution
- Sander Schepens's solution
- srashidi's solution
- Dave Meister's solution
- Andrew Park's solution
- Ricardo Villegas' solution
- James Brooks's solution
- BoDonkey's solution
- arocketman's solution
- Corey Kazaks' solution
- cdouglass's solution
- Peuchen's solution
- BartoszD's solution
- Maia Petee's solution
- Skye Free's solution
- Matt Leininger's solution
- Andrea Tozzini's solution
- Luke Walker's solution
- Dominik Chomicki's solution
- Matt Velez's solution
- Miguel Herrera's solution
- Andrew Johnson's solution
- YogAzathoth's solution
- Francisco Carlos's solution
- Claudio's solution
- Max Platt's solution
- Noobling's solution
- Andrew Wilson's solution
- Mateusz Staszczyk's solution
- Max Gallant's solution
- Kelvin Stone's solution
- Basel Awwad's solution
- Vivek Kumar's solution
- Jean Merlet's solution
- Zac Conner's solution
- parhaml's solution
- Francisco Darre's solution
- John Martinez's solution
- John Martinez's solution
- Omar Cagua's solution
- Stephanie's solution
- Fabricio Carrara's solution
- Anthony Vumbaca's solution
- Deepak's solution
- Lani Huang's solution
- Josh Cummings' solution
- Earth35's solution
- Metonimie's solution
- CodyLBuffaloe's solution
- Michael Sotkin's solution
- Shawn Stovall's solution
- Shala Qweghen's solution
- John Connor's solution
- dzero's solution
- Ricardo Ferreira's solution
- Josh Hipple's solution
- Odeson's solution
- Piotr Ejsmont's solution
- Oscar Y.'s solution
- Adam Graham's solution
- Ace Cassidy's solutionView in Browser
- Peter Taggart's solution
- Luchillo's solution
- Rahul's solution
- Jiazhi Guo's solution
- Zuqi Chen's solution
- Manu Phatak's Solution
- J-kaizen's
- Karthik's
- Young Jeong's Solution
- Sergey Badulins's solution
- Roy Chen's solution
- m-chrzan's solution
- Loris Aranda's solution
- HenrytheDJ's solution|View in Browser
- Jack Deegan's solution
- Defgarden's solution
- Adam Levin's solution
- Derek Kwong's solution
- Jakub Peikert's solution
- grzegorzzajac1989's solution
- Zach Beaird's solution
- Saroar Khandoker's solution
- Jason Keeney's solution
- Mike Coon's solution
- Yorick's solution
- Hassan's slution
- Bishal's solution
- Kaaviya's solution
- Jerry Gao's solution
- Tom Westerhout's solution
- Sophia Wu's solution
- Derek Scace's solution
- Stefan P's solution
- Joe Himes's solution
- Veselin Ivanov's solution
- Bill Hefty's solution
- jeff1st's solution
- Braydon Pacheco's solution
- Daniel Chinedu's solution
- Behdad Analui's solution
- Kaique "Rique" Borges' solution
- Siddharth Isaiah's solution
- Ryan Barnett's solution
- NIÑO MOLLANEDA's solution
- Alan Cruse's solution
- Roan Fourie's solution
- Robert Szabo's solution
- Rai Lee's solution
- Dan Sack's solution
- Parker Brown's solution
- Vaclav Skvaril´s solution
- Øistein Haugland´s solution
- Luján Fernaud's solution
- Pat's solution
- EMuchynski's solution
- Ian's solution
- Shobhit's solution
- Swojeet's solution
- Isashi's solution
- Kevin's solution
- Paritosh's solution
- Shelby's solution
- Andrew DeNike's solution

Implement a method `#stock_picker`

that takes in an array of stock prices, one for each hypothetical day. It should return a pair of days representing the best day to buy and the best day to sell. Days start at 0.

```
> stock_picker([17,3,6,9,15,8,6,1,10])
=> [1,4] # for a profit of $15 - $3 == $12
```

**Quick Tips:**

- You need to buy before you can sell
- Pay attention to edge cases like when the lowest day is the last day or the highest day is the first day.

*Submit a link to the github repo with your files in it here with a pull request. Please include your partner's github handle somewhere in the description if they would like attribution.*

- Add your solution below this line!
- Ben Deltenre's solution
- justinckim3's solution
- GuyInALabCoat's solution
- Kasey Z.'s solution
- Demo318's solution
- Dallaire's solution
- zulixro's solution
- SadieD's solution
- Grey-Ghost's solution
- xavier solution
- Webdev-burd's solution
- BenBrewerBowman's solution
- jfonz412's solution
- Jason Epstein's solution
- dfan14051's solution
- Oleh Sliusar's solution
- mindovermiles262's Solution
- RichJDSmith's Solution
- theghall's solution
- Ovsjah Schweinefresser's solution
- John Phelps's solution
- Sean Friedman's solution
- Chad Kreutzer's solution
- Josh Vogel's solution
- Austin Norman's solution
- ctcyu's solution
- eugyev's solution
- Jamie's solution
- Angel Vargas's solution
- Anh Le's solution
- Afshin M. (afshinator)'s solution
- brianllamar's solution
- Alan Russell's solution
- Marina Sergeyeva's solution
- Donald's solution
- Sahil's solution
- Mark W's solution
- Toxox's solution
- Tommy Noe's solution
- Steve Mitchell's solution
- Michael Alexander's solution
- Adrian Badarau's solution
- Cameron Kingsbury's solution
- James MacIvor's solution
- Maggie Baker's solution
- Hyeunjoon Kim's solution
- Aleksandar Rodić's solution
- Lara Finnegan's solution
- John Quarles's solution
- Vidul's solution
- Tomislav Mikulin's solution
- Artur Janik's solution
- Kate McFaul's solution
- Chris Dziewa's solution
- Dominik Stodolny's solution
- Andy Linteau's solution
- Josh Naughton's solution
- Jason Matthews's solution
- Ali Ayoub's solution
- JrodManU's solution
- chasmani's solution
- Kevin Mulhern's solution
- Emil Johansen's solution
- Sasikala's solution
- Sam Padrul's solution
- LongPotato's solution
- Eleanor's solution
- Dorian Iacobescu's solution
- Chris Hall's solution
- Lyman Wong's solution
- Antonio Augusto's solution
- omokoro's solution
- Andrej Dragojevic's solution
- Eddie's solution
- Gitman's solution
- Tom McGinn's solution
- Suneil's solution
- Jeremy Mauzy's solution
- Richard Stewart's solution
- Josh Klein's solution
- Pedro Amaral's solution
- Diarmuid Murphy's solution
- Dan Hoying's solution
- ll14m4n's solution
- AtActionPark's solution
- Matias Pan's solution
- Mark Viola's solution
- Glenn Crosby's solution
- Bhupendra Singh's solution
- Joe Balsamo's solution
- Gb69010p's solution
- Cody Gipson's solution
- Raycotek's solution
- M. Edgar Joel's solution
- Miguel Oliveira(Powerade)'s solution
- Xavier Reid's solution
- WCope's solution
- John Tobillo's solution
- PiotrAleksander's solution
- Aleksandre Clapin-Pepin's solution
- AnthonyL's solution
- Angus Dobson's solution
- Jason Mattingly's solution
- Alex Tsiras' solution
- Panashe Fundira's solution
- Paweł Cichoń solution
- pwdd
- Noah Prescott's solution
- Aviv Levinsky's solution
- Florian Mainguy's solution
- Scott Bobbitt's solution
- Wayne Ho's solution
- Chris Swanson's solution
- Maciej Panasiewicz's solution
- Simon Kraus' solution
- djhart's solution
- Theoderik Trajanson's solution
- Giorgos Mitsis's solution
- simoncal's solution
- Sander Schepens's solution
- srashidi's solution
- Dave Meister's solution
- Andrew Park's solution
- Ricardo Villegas' solution
- James Brooks's solution
- BoDonkey's solution
- arocketman's solution
- cdouglass's solution
- Peuchen's solution
- Skye Free's solution
- Maia Petee's solution
- BartoszD's solution
- Matt Leininger's solution
- Andrea Tozzini's solution
- Dominik Chomicki's solution
- Matt Velez's solution
- Miguel Herrera's solution
- Andrew Johnson's solution
- YogAzathoth's solution
- Francisco Carlos's solution
- Max Platt's solution
- Luke Walker's solution
- Noobling's solution
- Andrew Wilson's solution
- Mateusz Staszczyk's solution
- Max Gallant's solution
- Kelvin Stone's solution
- Jean Merlet's solution
- Zac Conner's solution
- parhaml's solution
- Yaroslav Smirnov's solution
- John Martinez's solution
- DV's solution
- John Martinez's solution
- Benjamin Contant's solution
- Johnny Rasnic's solution
- Stephanie's solution
- Fabricio Carrara's solution
- Anthony Vumbaca's solution
- Omar Cagua's solution
- Deepak's solution
- Lani Huang's solution
- Josh Cummings' solution
- Earth35's solution
- Metonimie's solution
- CodyLBuffaloe's solution
- Shawn Stovall's solution
- Shala Qweghen's solution
- John Connor's solution
- dzero's solution
- Michael Sotkin's solution
- Ricardo Ferreira's solution
- Josh Hipple's solution
- Odeson's solution
- Oscar Y.'s solution
- Adam Graham's solution
- Ace Cassidy's solutionView in Browser
- Luchillo's solution
- Rahul's solution
- Clint's solution
- Piotr Ejsmont's solution
- Jiazhi Guo's solution
- Zuqi Chen's solution
- Manu Phatak's Solution
- J-kaizen's solution
- Karthik's
- Young Jeong's Solution
- Sergey Badulins's solution
- Roy Chen's solution
- m-chrzan's solution (linear time algorithm)
- Loris Aranda's solution
- HenrytheDJ's solution|View in Browser
- Jack Deegan's solution
- Adam Levin's solution
- Derek Kwong's solution
- Jakub Peikert's solution
- Defgarden's solution
- grzegorzzajac1989's solution
- Zach Beaird's solution
- Saroar Khandoker's solution
- Jason Keeney's solution
- Mike Coon's solution
- Peter Taggart's solution
- Yorick's solution
- Hassan's solution
- Bishal's solution
- Kaaviya's Solution
- Jerry Gao's solution
- Tom Westerhout's solution
- Sophia Wu's solution
- Derek Scace's solution
- Stefan P's solution
- Joe Himes's solution
- Veselin Ivanov's solution
- Bill Hefty's solution
- jeff1st's solution
- Braydon Pacheco's solution
- Behdad Analui's solution
- Kaique "Rique" Borges' solution
- Siddharth Isaiah's solution
- Ryan Barnett's solution
- NIÑO MOLLANEDA's solution
- Alan Cruse's solution
- Roan Fourie's solution
- Robert Szabo's solution
- Rai Lee's solution
- husein's solution
- Dan Sack's solution
- Parker Brown's solution
- Vaclav Skvaril´s solution
- Øistein Hauglands´s solution
- Luján Fernaud's solution
- EMuchynski's solution
- Ian's solution
- Swojeet's solution
- Isashi's solution
- Paritosh's solution
- Shelby's solution
- Andrew DeNike's solution

Implement a method `#substrings`

that takes a word as the first argument and then an array of valid substrings (your dictionary) as the second argument. It should return a hash listing each substring (case insensitive) that was found in the original string and how many times it was found.

```
> dictionary = ["below","down","go","going","horn","how","howdy","it","i","low","own","part","partner","sit"]
=> ["below","down","go","going","horn","how","howdy","it","i","low","own","part","partner","sit"]
> substrings("below", dictionary)
=> {"below"=>1, "low"=>1}
```

Next, make sure your method can handle multiple words:

```
> substrings("Howdy partner, sit down! How's it going?", dictionary)
=> {"down"=>1, "how"=>2, "howdy"=>1,"go"=>1, "going"=>1, "it"=>2, "i"=> 3, "own"=>1,"part"=>1,"partner"=>1,"sit"=>1}
```

**Quick Tips:**

- Recall how to turn strings into arrays and arrays into strings.

*Submit a link to the github repo with your files in it here with a pull request. Please include your partner's github handle somewhere in the description if they would like attribution.*

- Add your solution below this line!
- Ben Deltenre's solution
- justinckim3's solution
- GuyInALabCoat's solution
- Kasey Z.'s solution
- Demo318's solution
- Dallaire's solution
- zulixro's solution
- SadieD's solution
- Grey-Ghost's solution
- xavier solution
- Webdev-burd's solution
- Arron's solution
- BenBrewerBowman's solution
- jfonz412's solution
- dfan14051's solution
- Oleh Sliusar's solution
- mindovermiles262's Solution
- RichJDSmith's Solution
- theghall's solution
- Neelotpal's solution
- Ovsjah Schweinefresser's solution
- John Phelps's solution
- Sean Friedman's solution
- Jib's Solution
- Chad Kreutzer's solution
- Josh Vogel's solution
- Austin Norman's solution
- ctcyu's solution
- eugyev's solution
- Jamie's solution
- Angel Vargas's solution
- Anh Le's solution
- brianllamar's solution
- Afshin M. (afshinator)'s solution
- Alan Russell's solution
- Marina Sergeyeva's solution
- Terry Bu's solution
- Donald's solution
- Sahil's solution
- Mark W's solution
- Toxox's solution
- Tommy Noe's solution
- Steve Mitchell's solution
- Michael Alexander's solution
- Adrian Badarau's solution
- James MacIvor's solution
- Maggie Baker's solution
- Aleksandar Rodić's solution
- Lara Finnegan's solution
- John Quarles's solution
- Jack Nguyen's solution
- Vidul's solution
- Tomislav Mikulin's solution
- Artur Janik's solution
- Angela Woods's solution
- Kate McFaul's solution
- Chris Dziewa's solution
- Dominik Stodolny's solution
- Andy Linteau's solution
- Josh Naughton's solution
- Jason Matthews's solution
- Ali Ayoub's solution
- chasmani's solution
- Kevin Weir's solution
- JrodManU's solution
- Kevin Mulhern's solution
- Emil Johansen's solution
- Sasikala's solution
- Sam Padrul's solution
- LongPotato's solution
- Eleanor's solution
- Dorian Iacobescu's solution
- Lyman Wong's solution
- Antonio Augusto's solution
- Andrej Dragojevic's solution
- omokoro's solution
- Eddie's solution
- Gitman's solution
- Tom McGinn's solution
- Jeremy Mauzy's solution
- Richard Stewart's solution
- Ryan Jordan's solution
- Josh Klein's solution
- Pedro Amaral's solution
- Diarmuid Murphy's solution
- Dan Hoying's solution
- ll14m4n's solution
- AtActionPark's solution
- Matias Pan's solution
- Mark Viola's solution
- Glenn Crosby's solution
- Bhupendra Singh's solution
- Joe Balsamo's solution
- Gb69010p's solution
- Cody Gipson's solution
- Raycotek's solution
- M. Edgar Joel's solution
- Miguel Oliveira's solution
- Xavier Reid's solution
- WCope's solution
- John Tobillo's solution
- Jake Dexheimer's solution
- Aleksandre Clapin-Pepin's solution
- PiotrAleksander's solution
- AnthonyL's solution
- Davis Campbell's solution
- Angus Dobson's solution
- Alex Tsiras' solution
- Panashe Fundira's solution
- Paweł Cichoń solution
- pwdd
- Noah Prescott's solution
- Aviv Levinsky's solution
- Florian Mainguy's solution
- Scott Bobbitt's solution
- Wayne Ho's solution
- Chris Swanson's solution
- Simon Kraus' solution
- djhart's solution
- Giorgos Mitsis's solution
- simoncal's solution
- Sander Schepens's solution
- srashidi's solution
- Dave Meister's solution
- Andrew Park's solution
- Ricardo Villegas' solution
- James Brooks's solution
- arocketman's solution
- cdouglass's solution (using Rabin-Karp algorithm)
- Peuchen's solution
- Corey Kazaks'
- Skye Free's
- Maia Petee's solution
- BartoszD's solution
- Matt Leininger's solution
- Andrea Tozzini's solution
- Dominik Chomicki's solution
- Matt Velez's solution
- Miguel Herrera's solution
- Andrew Johnson's solution
- YogAzathoth's solution
- Francisco Carlos's solution
- Max Platt's solution
- Luke Walker's solutions
- Noobling's solution
- Andrew Wilson's solution
- Mateusz Staszczyk's solution
- Max Gallant's solution
- Kelvin Stone's solution
- Jean Merlet's solution
- Zac Conner's solution
- parhaml's solution
- John Martinez's solution
- DV's solution
- Benjamin Contant's solution
- Stephanie's solution
- Fabricio Carrara's solution
- Anthony Vumbaca's solution
- Omar Cagua's solution)
- Deepak's solution
- Lani Huang's solution
- Josh Cummings' solution
- Earth35's solution
- Metonimie's solution
- CodyLBuffaloe's solution
- Shawn Stovall's solution
- Shala Qweghen's solution
- John Connor's solution
- dzero's solution
- Michael Sotkin's solution
- Ricardo Ferreira's solution
- Josh Hipple's solution
- Odeson's solution
- Oscar Y.'s solution
- Adam Graham's solution
- Ace Cassidy's solution (regex)View in Browser
- Luchillos's solution
- Rahul's solution
- Clint's solution
- Piotr Ejsmont's solution
- Jiazhi Guo's solution
- Zuqi Chen's solution
- Manu Phatak's Solution
- J-kaizen's solution
- Karthik's
- Young Jeong's Solution
- Sergey Badulins's solution
- Roy Chen's solution
- m-chrzan's solution (modified Rabin-Karp algorithm)
- Loris Aranda's solution
- HenrytheDJ's solution|View Online
- Jack Deegan's solution
- Adam Levin's solution
- Derek Kwong's solution
- Jakub Peikert's solution
- Defgarden's solution
- grzegorzzajac1989's solution
- Zach Beaird's solution
- Saroar Khandoker's solution
- Jason Keeney's solution
- Mike Coon's solution
- Yorick's solution
- Hassan's solution
- Bishal's Solution
- Kaaviya's Solution
- Jerry Gao's solution
- Tom Westerhout's solution
- Sophia Wu's solution
- Derek Scace's solution
- Stefan P's solution
- Joe Himes's solution
- Veselin Ivanov's solution
- Bill Hefty's solution
- jeff1st's solution
- Braydon Pacheco's solution
- Daniel Chinedu's solution
- Behdad Analui's solution
- Kaique "Rique" Borges' solution
- Siddharth Isaiah's solution
- Ryan Barnett's solution
- NIÑO MOLLANEDA's solution
- Roan Fourie's solution
- Robert Szabo's solution
- Rai Lee's solution
- husein's solution
- Dan Sack's solution
- Parker Brown's solution
- Vaclav Skvaril´s solution
- Øistein Hauglands´s solution
- Luján Fernaud's solution
- EMuchynski's solution
- Ian's solution
- Swojeet's solution
- Isashi's solution
- Paritosh's solution
- Andrew DeNike's solution

From the creators of The Odin Project...

The Viking Code School