MAQ Software interview question

2 basic frequency related coding problem and one cypher decoding.