This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# shortest_string is a method that takes an array of strings as its input | |
# and returns the shortest string | |
# | |
# +array+ is an array of strings | |
# shortest_string(array) should return the shortest string in +array+ | |
# | |
# If +array+ is empty the method should return nil | |
def shortest_string(array) | |
shortest = 0 | |
array.length.times do |i| |
NewerOlder