XAGE SECURITY interview question

How to implement a stack A question with a frequency map of characters