Aim: Consider a database table, Emails, which has the attributes First Name and Email ID. Given N rows of data simulating the Emails table, print an alphabetically-ordered list of people whose email address ends in '@gmail.com'.
Sample Input:
6
riya riya@gmail.com
julia julia@julia.me
julia sjulia@gmail.com
samantha samantha@gmail.com
tanya tanya@gmail.com
julia julia@gmail.com
Sample Output:
julia
julia
riya
samantha
tanya
Explanation:
Only the names of people having the substring '@gmail.com' in their mail ids
are printed.
Aim: Consider a database table, Emails, which has the attributes First Name and Email ID. Given N rows of data simulating the Emails table, print an alphabetically-ordered list of people whose email address ends in '@gmail.com'.
Sample Input: 6 riya riya@gmail.com julia julia@julia.me julia sjulia@gmail.com samantha samantha@gmail.com tanya tanya@gmail.com julia julia@gmail.com
Sample Output: julia julia riya samantha tanya
Explanation: Only the names of people having the substring '@gmail.com' in their mail ids are printed.