Metrodata interview question

Explain logic to get wildcard in coding