Intermediate RubyIntermediate level challenges and solutions
Prime Time
For this challenge you will be determining if an argument is a prime number.
13427 solutions
Solution
Run Length
For this challenge you will determine the Run Length Encoding of a string.
8984 solutions
Solution
Prime Mover
For this challenge you will be returning a certain prime number.
7862 solutions
Solution
Palindrome Two
For this challenge you will be determining if a string is a palindrome.
7905 solutions
Solution
String Scramble
For this challenge you will determine if string 1 can be rearranged into string 2.
7759 solutions
Solution
Arith Geo II
For this challenge you will determine if numbers within an array follow an arithmetic or geometric sequence.
5234 solutions
Solution
Array Addition
For this challenge you will determine if numbers in an array can add up to a certain number in the array.
4903 solutions
Solution
Binary Converter
For this challenge you will be converting a number from binary to decimal.
4838 solutions
Solution
Letter Count
For this challenge you will determine which word has the greatest number of repeated letters.
4873 solutions
Solution
Caesar Cipher
For this challenge you will transform a string using the Caesar Cipher.
5640 solutions
Solution
Simple Mode
For this challenge you will determine the mode, the number that appears most frequently, in an array.
5218 solutions
Solution
Consecutive
For this challenge you will determine how to order an array of numbers consecutively.
4313 solutions
Solution
Formatted Division
For this challenge you will divide two numbers and print them in a certain format.
3984 solutions
Solution
Counting Minutes
For this challenge you will return the total number of minutes between two times.
2991 solutions
Solution
Permutation Step
For this challenge you will determine the next greatest number using the same numbers of a given argument.
3759 solutions
Solution
Prime Checker
For this challenge you will determine if you can arrange a number to be a prime number.
2700 solutions
Solution
Dash Insert II
For this challenge you will be manipulating a string using dashes (-).
5118 solutions
Solution
Number Search
For this challenge you will traverse a string searching for all the numbers and then you will add them up.
3549 solutions
Solution
Triple Double
For this challenge you will determine if there is a number that appears consecutively in both arguments.
3282 solutions
Solution
Bracket Matcher
For this challenge you will determine if the brackets in a string are correctly matched up.
3064 solutions
Solution
String Reduction
For this challenge you will manipulate a string of characters using a simple reduction method.
2656 solutions
Solution
ThreeFive Multiples
For this challenge you will be determining the multiples of a specific number.
2958 solutions
Solution
Binary Search Tree LCA
For this challenge you will attempt to find the lowest common ancestor of a binary search tree.
486 solutions
Solution
Coin Determiner
For this challenge you will be determining the smallest combination of coins for a given output
2530 solutions
Solution
Fibonacci Checker
For this challenge you will be determining whether a number is part of the Fibonacci sequence.
2881 solutions
Solution
Multiple Brackets
For this challenge you will determine if all the brackets in a string are correctly matched up.
2471 solutions
Solution
Most Free Time
For this challenge you will determine what period of the day gives the most free time.
1623 solutions
Solution
Overlapping Rectangles
For this challenge you will be determining the areas of rectangles.
1719 solutions
Solution
Look Say Sequence
For this challenge you will determine the next number in a sequence.
1557 solutions
Solution
Distinct List
For this challenge you will remove duplicate elements from an array.
2714 solutions
Solution
Number Encoding
For this challenge you will encode a given string following a specific rule.
1566 solutions
Solution
Stock Picker
For this challenge you will determine the maximum profit that can be made in a range of stock prices.
1000 solutions
Solution
Missing Digit
For this challenge you will determine what the variable is in a mathematical equation.
639 solutions
Solution
K Unique Characters
For this challenge you will be searching a string for a particular substring.
1019 solutions
Solution
Symmetric Tree
For this challenge you will traverse a binary tree and determine if it is symmetric.
398 solutions
Solution
Binary Tree LCA
For this challenge you will attempt to find the lowest common ancestor of a binary tree.
328 solutions
Solution
Tree Constructor
For this challenge you will determine if an array of integer pairs can form a binary tree properly.
470 solutions
Solution
Array Min Jumps
For this challenge you will determine how quickly you can reach the end of an array.
294 solutions
Solution
Nearest Smaller Values
For this challenge you will determine the nearest smaller value for each number in an array.
569 solutions
Solution
Word Split
For this challenge you will attempt to split a long string of characters into actual words.
801 solutions
Solution
Pair Searching
For this challenge you will determine how to multiply a number to find a duplicate pair.
165 solutions
Solution
Boggle Solver
For this challenge you will attempt to find words in a matrix of letters.
153 solutions
Solution
HTML Elements
For this challenge you will determine whether HTML elements are nested correctly.
517 solutions
Solution
Missing Digit II
For this challenge you will determine what the variables are in a mathematical equation.
200 solutions
Solution
Palindromic Substring
For this challenge you will be finding the longest palindromic substring.
434 solutions
Solution
Trapping Water
For this challenge you will determine the largest amount of water you can trap within a boundary.
214 solutions
Solution
Matrix Path
For this challenge you will determine if a path exists in a boolean matrix.
336 solutions
Solution
Seating Students
For this challenge you will determine how many different ways students can sit next to each other.
550 solutions
Solution
Longest Matrix Path
For this challenge you will be searching for the longest path in a 2D matrix.
96 solutions
Solution
Min Window Substring
For this challenge you will be searching for the optimal substring of k characters.
972 solutions
Solution
Matrix Chains
For this challenge you will determine the best order to multiply matrices.
95 solutions
Solution
Histogram Area
For this challenge you will determine the largest area under a histogram.
327 solutions
Solution
Matching Characters
For this challenge you will be determining the largest number of unique characters between two letters.
455 solutions
Solution
Ternary Converter
For this challenge you will be converting a decimal number into ternary.
121 solutions
Solution
Linear Congruence
For this challenge you will be solving a linear congruence equation.
73 solutions
Solution
Formatted Number
For this challenge you will be determining if a string is a valid number.
319 solutions
Solution
Largest Row Column
For this challenge you will be finding the largest sum of three digits in a matrix.
92 solutions
Solution
Eight Queens
This challenge will require knowledge of chess pieces and their movements.
3286 solutions
Solution
Three Points
For this challenge you will be plotting a line on a Cartesian grid.
181 solutions
Solution
Character Removal
For this challenge you will attempt to modify a word and then find it within a dictionary.
222 solutions
Solution
Simple Password
For this challenge you will be determining if a string is a valid password.
551 solutions
Solution
String Zigzag
For this challenge you will be printing a string in a particular zig-zag format.
134 solutions
Solution
Off Binary
For this challenge you will be determining the correct binary number.
115 solutions
Solution
Longest Consecutive
For this challenge you will compute the length of the longest consecutive subsequence.
469 solutions
Solution
String Expression
For this challenge you will convert a string of written numbers to an actual number.
187 solutions
Solution
Charlie the Dog
For this challenge you will be helping a dog collect all the food in a grid.
232 solutions
Solution
Plus Minus
For this challenge you will need to determine how to add or subtract numbers to end up with zero.
552 solutions
Solution
String Calculate
For this challenge you will be evaluating a mathematical expression within a string.
153 solutions
Solution