February 24 - Finding the Largest Word in a Ruby Array of Mixed Strings
This guide describes how to find the largest word in a Ruby array filled with mixed strings.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
  • Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license

Summary

Implement a method that returns the longest string in an array of mixed strings.

Exercise Description

Build a method that returns the largest word in a Ruby array, even when it's filled with variable length strings.

Sample Input

['A sentence', 'broken into several', 'array elements']

Expected Output

'sentence'

Real World Usage

This is an important skill to understand when it comes to working with data that isn't formatted perfectly, which is common when working with machine learning algorithms.

Test Cases

Code File