This repository is a port from igorwojda/kotlin-coding-challenges, containing a set of programming challenges that are intended to be solved by using the Ruby language (hints, solutions tests and useful links are here as well).
The purpose of this repository is to help you to practice coding and develop strong problem-solving skills. This will help you to become a better programmer and improve your chance of getting a new job by passing whiteboard coding interviews.
Each challenge is located in separate package, and it contains 3 main files (screen):
README.md
- the task description.challenge_spec.rb
- file containing an empty method/class where challenge should be solved. This file also contains set of test and occasionally helper methods. You can run all tests directly from this file (click green arrow next toTest
class). RSpec tests which verify that task was solved correctly.solution.rb
- a file containing one or more solutions.
- Install IntelliJ IDEA
- Import project by using Ruby Mine menu:
File | New | Project From Version Control | Git
- Choose a challenge (spec/ directory) and code the solution
- Run the tests to verify your solution
Challenges below are segregated by different difficulties. The repository also contains challenges grouped by problem type.
Some challenges may contain a reference to other challenges that should be solved before to have a better understanding of the problem. Check the look at problem-solving strategy .
Take your time before you view the presented solution. To succeed you need to practice often, repeat the same challenges multiple times and be persistent over time.
Good luck!
New in Town
- Capitalize sentence
- Get odd numbers
- Range contains range?
- Add up to
- Linear search
- Count down
- Count up then down
- Format train route
- Generate all pairs
- Count unique values
- Print numbers
- Print numbers with steps
- Power
- Product
- Capitalize first
- Decapitalize const
- Longest word
Apprentice
- Is palindrome
- Is tolerant palindrome
- Is permutation palindrome
- Is anagram
- Max occurring char
- String reverse
- Find the vowels
- Max occurring char
- Int reverse
- Pyramid generator
- Steps generator
- Fizz Buzz
- Caesar Cipher
- Has repeated char
Warrior