You are viewing a single comment's thread. Return to all comments →
N = gets.strip.to_i arr = [] for a0 in (0..N-1) firstName,emailID = gets.strip.split(' ') arr << firstName if emailID.include?("@gmail.com") || emailID.include?("@gmail.edu") end puts arr.sort
Solution is obv. not reg-ex, but in the event there are @gmail.edu emails, the adjusted code above would account for them as well.
Seems like cookies are disabled on this browser, please enable them to open this website
Day 28: RegEx, Patterns, and Intro to Databases
You are viewing a single comment's thread. Return to all comments →
Solution is obv. not reg-ex, but in the event there are @gmail.edu emails, the adjusted code above would account for them as well.