Dictionary Key-Value Swap
Medium📝 Description
Swap keys and values in a dictionary.
Input Format
{"a": 1, "b": 2, "c": 3}
Output Format
{1: "a", 2: "b", 3: "c"}
Constraints
Dictionary size ≤ 10^5
🔍 Sample Input
{"a": 1, "b": 2, "c": 3}
✅ Sample Output
{1: "a", 2: "b", 3: "c"}
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run