Ordway Labs interview question

Hash map Question and logical question