HackerRank - Display an element of an array

April - 25/2025

Problem:

Given a list of countries, each on a new line, your task is to read them into an array and then display the element indexed at 3. Note that indexing starts from 0.

# Input

# Output

# Solution

            
    mapfile -t array
    echo "${array[3]}"
    

Post: