When the virgins were being gathered together, Mordecai was sitting at the king's gate.
References for Esther 2:19
Now Esther had not revealed her kindred or her people, as Mordecai had charged her; for Esther obeyed Mordecai just as when she was brought up by him.
In those days, while Mordecai was sitting at the king's gate, Bigthan and Teresh, two of the king's eunuchs, who guarded the threshold, became angry and conspired to assassinate King Ahasuerus.
References for Esther 2:21
But the matter came to the knowledge of Mordecai, and he told it to Queen Esther, and Esther told the king in the name of Mordecai.
When the affair was investigated and found to be so, both the men were hanged on the gallows. It was recorded in the book of the annals in the presence of the king.