How can I implement HashMap and TreeMap efficiently without using Collections/STL ?
First of all, create a road map of what kind of structure/class you will be needed, what are members will be required and what functions you have to write for adding the key - value pair. Focus on the hash function that you are going to write to hash the keys to their corresponding values. Go through some standard docs regarding hash Tables/hash map and read about the terms like Load Factor, Rehashing (In case of dynamism). After that you will be able to decide by yourself that how you can make your hashmap efficient.