Similar Collections


In Ruby, arrays are ordered, integer-indexed collections of any object. The indexing of an array starts at 0. A new array can be created by using the literal constructor []. Arrays can contain different types of objects. For example, the array below contains an Integer, a String and a Float.

This study list contains Ruby arrays programs, practice these Ruby programs to learn the concept of Ruby arrays, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Ruby arrays programs.

questions

Title
Ruby program to demonstrate the Array.map() method
Ruby program to demonstrate the Array.collect() method
Ruby program to remove duplicate elements from the array
Ruby program to demonstrate the Array.concat() method
Ruby program to remove elements from the array using delete_if() method
Ruby program to demonstrate the Array.dig() method
Ruby program to remove all elements from the array
Ruby program to remove all \'nil\' elements from the array
Ruby program to check an array is empty or not
Ruby program to fetch elements from an array based on an index
Ruby program to fill an array with a specific element
Ruby program to find the largest element from the array
Ruby program to find the second largest element from the array
Ruby program to find the EVEN numbers from the array
Ruby program to calculate the sum of array elements
Ruby program to reverse an array without using library function
Ruby program to find the prime numbers from the array
Ruby program to search an item into the array using linear search
Ruby program to search an item into the array using binary search
Ruby program to search an item into the array using interpolation search
total questions: 81

Questions

81

Views

865

Best Answers

299

Points

5