Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

an HCL GUVI product

Home /Programming Exercises /Ruby/ Intermediate

Ruby Exercises

Master Ruby with hands-on practice problems across Beginner, Intermediate, and Advanced tracks. Filter by level, difficulty or status, and solve in our in-browser compiler.

70 questions0 / 70 solved3 levelsUpdated weekly

Programming Tracks16 Tracks

Py

Python

90 Questions
Progress0 / 90 (0%)
BeginnerIntermediateAdvanced
☕

Java

90 Questions
Progress0 / 90 (0%)
BeginnerIntermediateAdvanced
C++

C++

90 Questions
Progress0 / 90 (0%)
BeginnerIntermediateAdvanced
Rb

Ruby

70 Questions
Active Track0 / 70 (0%)
BeginnerIntermediateAdvanced

Ruby Questions30 Problems

0/70 Solved
QuestionDifficultyProgressStatus
RbWrite a program to find the first non-repeating character in a string.Ruby · Intermediate
Med.0%Not Started
RbImplement a method to flatten a nested array without using the flatten method.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to generate all permutations of a given string.Ruby · Intermediate
Med.0%Not Started
RbCreate a class Circle that calculates area and circumference, given the radius.Ruby · Intermediate
Med.0%Not Started
RbWrite a program to check if a number is an Armstrong number.Ruby · Intermediate
Med.0%Not Started
RbCreate a method to find the longest word in a sentence.Ruby · Intermediate
Med.0%Not Started
RbWrite a program to rotate an array n times to the right.Ruby · Intermediate
Med.0%Not Started
RbImplement a binary search algorithm for a sorted array.Ruby · Intermediate
Med.0%Not Started
RbWrite a program to check if a string is a valid IPv4 address.Ruby · Intermediate
Med.0%Not Started
RbCreate a class Rectangle with methods to calculate area and perimeter.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to remove duplicate elements from an array without using uniq.Ruby · Intermediate
Med.0%Not Started
RbCreate a program to count the frequency of words in a sentence.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to find the common elements in three arrays.Ruby · Intermediate
Med.0%Not Started
RbImplement a method to check if a string is a valid palindrome, ignoring case and non-alphanumeric characters.Ruby · Intermediate
Med.0%Not Started
RbCreate a program to convert a Roman numeral to an integer.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to calculate the sum of digits of a given number.Ruby · Intermediate
Med.0%Not Started
RbCreate a program to group anagrams from an array of strings.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to find all pairs in an array that sum up to a given value.Ruby · Intermediate
Med.0%Not Started
RbImplement a method to calculate the power of a number using recursion.Ruby · Intermediate
Med.0%Not Started
RbCreate a class BankAccount with deposit and withdraw methods.Ruby · Intermediate
Med.0%Not Started
RbWrite a method to generate Pascal's Triangle up to n rows.Ruby · Intermediate
Med.0%Not Started
RbCreate a program to find the GCD (Greatest Common Divisor) of two numbers using recursion.Ruby · Intermediate
Med.0%Not Started
RbWrite a program to count the number of occurrences of a substring in a string.Ruby · Intermediate
Med.0%Not Started
RbCreate a method to find the longest common prefix among an array of strings.Ruby · Intermediate
Med.0%Not Started
RbWrite a program to check if a number is a happy number.Ruby · Intermediate
Med.0%Not Started
RowsShowing 1 - 25 of 30

Frequently asked questions

What programming languages are covered in the exercises?
Our platform supports Python, Java, C, C++, JavaScript, and more languages used in the industry today.
How are the exercises divided across difficulty levels
Our exercises are organized into Beginner, Intermediate, and Advanced levels, letting you progress naturally.
Are the exercises suitable for both beginners and experienced coders?
Yes, the exercises are suitable for both beginners and experienced coders.
How do topic-wise exercises help in better learning?
The topic-wise exercises let you focus on one concept at a time, strengthening your understanding step by step.
Do the exercises cover both basic syntax and complex algorithms?
Yes, from basic syntax to complex algorithms, our exercises span the full range of programming challenges.
Can these exercises prepare me for coding interviews?
Yes, these exercises are designed to match real interview questions, helping you prepare for coding interviews.
Is there an integrated IDE on the platform to run and test the code?
Yes, our platform includes a built-in web IDE where you can write, test, and run your code instantly.
Do the exercises include solutions or hints for guidance?
Yes, when you're stuck, you can access helpful hints or study complete solutions to learn different approaches.
Are there any prerequisites for attempting the advanced-level exercises?
Yes, advanced exercises require a solid understanding of the basics and intermediate concepts of your chosen language.
How do these exercises improve coding speed and efficiency?
Through consistent practice and exposure to diverse challenges, you'll naturally become faster and more efficient at coding.
Is there a time limit for completing each exercise?
No, take as long as you need – our focus is on learning, not racing against the clock.
Are the exercises updated regularly to include new challenges?
Yes, we consistently update our exercise collection to include new challenges and keep up with industry trends.