Collections • Lesson 24/100
Maps
Key-value pair collections
📚
Learn💻
Code❓
Quiz🏆
Practice⭐
Complete📚 Lý thuyết
**Map** lưu trữ dữ liệu theo cặp key-value.
**Đặc điểm:**
- Key phải unique
- Value có thể trùng
- Truy cập nhanh theo key O(1)
**Tạo Map:**
- mapOf(key to value, ...)
- mutableMapOf()
**Truy cập:**
- map[key] hoặc map.get(key)
- map.keys, map.values, map.entries